Versions in this module Expand all Collapse all v0 v0.0.0 Nov 23, 2022 Changes in this version + const BANNER + const ProtoGenVersion1_0 + var DefaultInitializers = []Initializer + var ErrNil = errors.New("nil argument passed") + var ErrNotServiceFactory = errors.New("you need to pass either a ServiceFactory or ServiceFactoryV2") + func AddConfigPath(path ...string) + func RegisterDecoder(svr Server, serviceName, method string, decoder Decoder) + func RegisterDefaultDecoder(svr Server, serviceName string, decoder Decoder) + func RegisterDefaultEncoder(svr Server, serviceName string, encoder Encoder) + func RegisterEncoder(svr Server, serviceName, method, httpMethod, path string, encoder Encoder) + func RegisterEncoders(svr Server, serviceName, method string, httpMethod []string, path string, ...) + func RegisterHandler(svr Server, serviceName, method string, path string, handler HTTPHandler) + func RegisterMethodOption(svr Server, serviceName, method, option string) + func RegisterMiddleware(svr Server, serviceName, method string, middleware ...string) + func ResetConfigPath() + type Config struct + DefaultJSONPB bool + DisableDefaultInterceptors bool + EnablePrometheus bool + EnablePrometheusHistogram bool + EnableProtoURL bool + Env string + GRPCOnly bool + GRPCPort string + HTTPOnly bool + HTTPPort string + HotReload bool + HystrixConfig HystrixConfig + MaxRecvMsgSize int + NewRelicConfig NewRelicConfig + OrionServerName string + PProfport string + RollbarToken string + SentryDSN string + ZipkinConfig ZipkinConfig + func BuildDefaultConfig(name string) Config + type Decoder = handlers.Decoder + type DefaultServerImpl struct + func (d *DefaultServerImpl) AddDecoder(serviceName, method string, decoder handlers.Decoder) + func (d *DefaultServerImpl) AddDefaultDecoder(serviceName string, decoder Decoder) + func (d *DefaultServerImpl) AddDefaultEncoder(serviceName string, encoder Encoder) + func (d *DefaultServerImpl) AddEncoder(serviceName, method string, httpMethod []string, path string, ...) + func (d *DefaultServerImpl) AddHTTPHandler(serviceName string, method string, path string, handler handlers.HTTPHandler) + func (d *DefaultServerImpl) AddInitializers(ins ...Initializer) + func (d *DefaultServerImpl) AddMiddleware(serviceName string, method string, middlewares ...string) + func (d *DefaultServerImpl) AddOption(serviceName, method, option string) + func (d *DefaultServerImpl) GetConfig() map[string]interface{} + func (d *DefaultServerImpl) GetOrionConfig() Config + func (d *DefaultServerImpl) RegisterService(sd *grpc.ServiceDesc, sf interface{}) error + func (d *DefaultServerImpl) Start() + func (d *DefaultServerImpl) Stop(timeout time.Duration) error + func (d *DefaultServerImpl) Wait() error + type DefaultServerOption interface + func WithGrpcUnknownHandler(grpcUnknownServiceHandler grpc.StreamHandler) DefaultServerOption + type Encoder = handlers.Encoder + type FactoryParams struct + ServiceName string + Version uint64 + type HTTPHandler = handlers.HTTPHandler + type HystrixConfig struct + CommandConfig map[string]hystrix.CommandConfig + DefaultErrorPercentThreshold int + DefaultMaxConcurrent int + DefaultSleepWindow int + DefaultTimeout int + DefaultVolumeThreshold int + Port string + StatsdAddr string + func BuildDefaultHystrixConfig() HystrixConfig + type Initializer interface + Init func(svr Server) error + ReInit func(svr Server) error + func ErrorLoggingInitializer() Initializer + func HystrixInitializer() Initializer + func NewRelicInitializer() Initializer + func PprofInitializer() Initializer + func PrometheusInitializer() Initializer + func ZipkinInitializer() Initializer + type NewRelicConfig struct + APIKey string + ExcludeAttributes []string + HttpTxNameType string + IncludeAttributes []string + ServiceName string + func BuildDefaultNewRelicConfig() NewRelicConfig + type Server interface + AddInitializers func(ins ...Initializer) + GetConfig func() map[string]interface{} + GetOrionConfig func() Config + RegisterService func(sd *grpc.ServiceDesc, sf interface{}) error + Start func() + Stop func(timeout time.Duration) error + Wait func() error + func GetDefaultServer(name string, opts ...DefaultServerOption) Server + func GetDefaultServerWithConfig(config Config) Server + type ServiceFactory interface + DisposeService func(svc interface{}) + NewService func(Server) interface{} + type ServiceFactoryV2 interface + DisposeService func(svc interface{}, params FactoryParams) + NewService func(svr Server, params FactoryParams) interface{} + func ToServiceFactoryV2(sf interface{}) (ServiceFactoryV2, error) + type ZipkinConfig struct + Addr string + func BuildDefaultZipkinConfig() ZipkinConfig