micro--go-micro
1c69836b45
Move internal/non-public packages behind internal/ or into their parent packages where they belong: - deploy/ → gateway/mcp/deploy/ (Helm charts belong with the gateway) - profile/ → service/profile/ (preset plugin profiles are a service concern) - scripts/ → internal/scripts/ (install script is not public API) - test/ → internal/test/ (test harness is not public API) - util/ → internal/util/ (internal helpers shouldn't be imported externally) Also fixes CLAUDE.md merge conflict markers and updates project structure documentation. All import paths updated. Build and tests pass. https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
41 行
572 B
Go
41 行
572 B
Go
package pool
|
|
|
|
import (
|
|
"time"
|
|
|
|
"go-micro.dev/v5/transport"
|
|
)
|
|
|
|
type Options struct {
|
|
Transport transport.Transport
|
|
TTL time.Duration
|
|
CloseTimeout time.Duration
|
|
Size int
|
|
}
|
|
|
|
type Option func(*Options)
|
|
|
|
func Size(i int) Option {
|
|
return func(o *Options) {
|
|
o.Size = i
|
|
}
|
|
}
|
|
|
|
func Transport(t transport.Transport) Option {
|
|
return func(o *Options) {
|
|
o.Transport = t
|
|
}
|
|
}
|
|
|
|
func TTL(t time.Duration) Option {
|
|
return func(o *Options) {
|
|
o.TTL = t
|
|
}
|
|
}
|
|
|
|
func CloseTimeout(t time.Duration) Option {
|
|
return func(o *Options) {
|
|
o.CloseTimeout = t
|
|
}
|
|
}
|