Documentation ¶
Index ¶
- Variables
- type Option
- func AfterStart(fn func() error) Option
- func AfterStop(fn func() error) Option
- func BeforeStart(fn func() error) Option
- func BeforeStop(fn func() error) Option
- func Context(ctx context.Context) Option
- func Name(s string) Option
- func Registry(s registrystore.Store) Option
- func ServiceDescription(s grpc.ServiceDesc) Option
- func Tracer(s tracer.Tracer) Option
- func Using(e *Options) Option
- type Options
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultName = "rai-project/service[default]"
)
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func AfterStart ¶
func BeforeStart ¶
func BeforeStop ¶
func Registry ¶
func Registry(s registrystore.Store) Option
func ServiceDescription ¶
func ServiceDescription(s grpc.ServiceDesc) Option
type Options ¶
type Options struct { Name string Description grpc.ServiceDesc // Register loop interval RegisterInterval time.Duration // Tracer Tracer tracer.Tracer // Registry Registry registrystore.Store // Before and After funcs BeforeStart []func() error BeforeStop []func() error AfterStart []func() error AfterStop []func() error Context context.Context }
func NewOptions ¶
Click to show internal directories.
Click to hide internal directories.