Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterService ¶
func RegisterService(r Registration) error
Types ¶
type DBRegister ¶ added in v0.3.0
type HandlerServer ¶
type NamespaceMap ¶ added in v0.3.0
type NamespaceMap map[string]ServiceMap
var RegisteredServices NamespaceMap
Map of namespaces to services
type RegisterFunc ¶
type RegisterFunc func(RegistrationParams) (Impl any, HandlerServer HandlerServer)
type Registration ¶
type Registration struct { Namespace string ServiceDesc *grpc.ServiceDesc RegisterFunc RegisterFunc // Optional to specify if the service requires a database connection DB DBRegister }
type RegistrationParams ¶
type RemoteServiceConfig ¶
type RemoteServiceConfig struct {
Endpoint string `yaml:"endpoint"`
}
type Service ¶
type Service struct { Registration Started bool Close func() }
type ServiceConfig ¶
type ServiceConfig struct { Enabled bool `yaml:"enabled"` Remote RemoteServiceConfig `yaml:"remote"` ExtraProps map[string]interface{} `json:"-" mapstructure:",remain"` }
type ServiceMap ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.