27 tsaClient TSAClient,
28 bcClient baggageclaim.Client,
29 maxInFlight uint16,
30) *volumeSweeper {31 return &volumeSweeper{
32 logger: logger,
33 interval: sweepInterval,
68
69// NewRootfsManager instantiates a rootfsManager
70//
71func NewRootfsManager(opts ...RootfsManagerOpt) *rootfsManager { 72 m := &rootfsManager{
73 mkdirall: os.MkdirAll,
74 }
26
27type processKiller struct{}
28
29func NewProcessKiller() *processKiller {30 return &processKiller{}
31}
32
84
85var _ Client = (*client)(nil)
86
87func New(addr, namespace string, requestTimeout time.Duration) *client { 88 return &client{
89 addr: addr,
90 namespace: namespace,
78 }
79}
80
81func NewKiller(opts ...KillerOpt) *killer { 82 k := &killer{
83 gracePeriod: GracePeriod,
84 processKiller: NewProcessKiller(),
An exported function or method returning a value of an unexported type may be frustrating to use.
In Go, if the function or method starts with a lowercase letter, it is not exported outside the package.
type unexportedType string
func ExportedFunc() *unexportedType {
return &unexportedType("some string")
}
type ExportedType string
func ExportedFunc() *ExportedType {
return &ExportedType("some string")
}