Documentation
¶
Index ¶
- Constants
- func AddFuncs(serveName string, funcs ...func(ctx context.Context) error) suture.ServiceToken
- func AddFuncsOnServe(id suture.ServiceToken, funcs ...func(ctx context.Context) error)
- func AddFuncsWithSpec(serveName string, spec suture.Spec, funcs ...func(ctx context.Context) error) suture.ServiceToken
- func AddServe(serveName string, svr suture.Service, funcs ...func(ctx context.Context) error) suture.ServiceToken
- func AddServeWithSpec(serveName string, svr suture.Service, spec suture.Spec, ...) suture.ServiceToken
- func Down() error
- func Remove(id suture.ServiceToken) error
- func RemoveAndWait(id suture.ServiceToken, timeout time.Duration) error
- type Context
- type Service
Constants ¶
View Source
const ServiceTimeout = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func AddFuncsOnServe ¶
func AddFuncsOnServe(id suture.ServiceToken, funcs ...func(ctx context.Context) error)
func AddFuncsWithSpec ¶
func AddServeWithSpec ¶
func Remove ¶
func Remove(id suture.ServiceToken) error
func RemoveAndWait ¶
func RemoveAndWait(id suture.ServiceToken, timeout time.Duration) error
Types ¶
type Context ¶
type Context struct {
*suture.Supervisor
// contains filtered or unexported fields
}
@Singleton(localGetter)
func (*Context) Add ¶
func (c *Context) Add(sup *suture.Supervisor) suture.ServiceToken
func (*Context) RemoveAndWait ¶
Click to show internal directories.
Click to hide internal directories.