Versions in this module Expand all Collapse all v1 v1.2.1 Mar 15, 2020 Changes in this version + var DefaultAddress = ":0" + var DefaultId = uuid.NewUUID().String() + var DefaultName = "go-server" + var DefaultVersion = "1.0.0" + func NewContext(ctx context.Context, s Server) context.Context + type Message interface + ContentType func() string + Payload func() interface{} + Topic func() string + type Option func(*Options) + func Address(a string) Option + func Advertise(a string) Option + func Id(id string) Option + func Metadata(md map[string]string) Option + func Name(n string) Option + func RegisterInterval(t time.Duration) Option + func RegisterTTL(t time.Duration) Option + func Registry(r registry.Registry) Option + func Version(v string) Option + func Wait(b bool) Option + type Options struct + Address string + Advertise string + Context context.Context + Id string + Metadata map[string]string + Name string + RegisterInterval time.Duration + RegisterTTL time.Duration + Registry registry.Registry + Version string + type Request interface + ContentType func() string + Method func() string + Request func() interface{} + Service func() string + Stream func() bool + type Server interface + Id func() string + Init func(...Option) error + OnDestroy func() error + OnInit func(module module.Module, app module.App, settings *conf.ModuleSettings) error + Options func() Options + Register func(id string, f interface{}) + RegisterGO func(id string, f interface{}) + ServiceDeregister func() error + ServiceRegister func() error + SetListener func(listener mqrpc.RPCListener) + Start func() error + Stop func() error + String func() string + func FromContext(ctx context.Context) (Server, bool) + func NewServer(opt ...Option) Server + type Stream interface + Close func() error + Context func() context.Context + Error func() error + Recv func(interface{}) error + Request func() Request + Send func(interface{}) error