Documentation ¶
Index ¶
Constants ¶
View Source
const ( FeatureNamePrefix = "mikros_framework-" HttpFeatureName = FeatureNamePrefix + "http" HttpCorsFeatureName = FeatureNamePrefix + "http_cors" HttpAuthFeatureName = FeatureNamePrefix + "http_auth" TracingFeatureName = FeatureNamePrefix + "tracing" TrackerFeatureName = FeatureNamePrefix + "tracker" LoggerExtractorFeatureName = FeatureNamePrefix + "logger_extractor" PanicRecoveryFeatureName = FeatureNamePrefix + "panic_recovery" )
Internal feature names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcClient ¶
type GrpcClient struct { // ServiceName should be the service name. ServiceName service.Name // NewClientFunction should point to the service API function that can create // its gRPC client interface. NewClientFunction interface{} }
GrpcClient is a structure to set information about a gRPC client that will be coupled by a service.
func (*GrpcClient) Validate ¶
func (g *GrpcClient) Validate() error
type GrpcServiceOptions ¶
type GrpcServiceOptions struct {
ProtoServiceDescription *grpc.ServiceDesc
}
GrpcServiceOptions gathers options to initialize a gRPC service.
func (*GrpcServiceOptions) Kind ¶
func (g *GrpcServiceOptions) Kind() definition.ServiceType
type HttpServiceOptions ¶
type HttpServiceOptions struct {
ProtoHttpServer httpServiceAPI.HttpServer
}
HttpServiceOptions gathers options to initialize a service as an HTTP service.
func (*HttpServiceOptions) Kind ¶
func (h *HttpServiceOptions) Kind() definition.ServiceType
type NativeServiceOptions ¶
type NativeServiceOptions struct{}
func (*NativeServiceOptions) Kind ¶
func (n *NativeServiceOptions) Kind() definition.ServiceType
type NewServiceOptions ¶
type NewServiceOptions struct { // Service must have all required service options according the types // defined in the 'service.toml' file. The same type name should be // used as key here. Service map[string]ServiceOptions `validate:"required"` // RunTimeFeatures must hold everything that will only be available // when the service executes. The key here should be the same as the // feature where the options will be sent. RunTimeFeatures map[string]interface{} // GrpcClients should have every gRPC dependency that the service // may have. GrpcClients map[string]*GrpcClient }
NewServiceOptions gathers all the main options that one can use to create a new service.
func (*NewServiceOptions) Validate ¶
func (o *NewServiceOptions) Validate() error
Validate validates if a NewServiceOptions object contains the required information initialized to proceed.
type ScriptServiceOptions ¶
type ScriptServiceOptions struct{}
func (*ScriptServiceOptions) Kind ¶
func (s *ScriptServiceOptions) Kind() definition.ServiceType
type ServiceOptions ¶
type ServiceOptions interface {
Kind() definition.ServiceType
}
ServiceOptions is an interface that all services options structure must implement.
Click to show internal directories.
Click to hide internal directories.