Documentation
¶
Overview ¶
Package server is a package that holds the http or grpc service.
Index ¶
- func NewCronServer(tasks []*gocron.Task, opts ...CRONOption) app.IServer
- func NewGRPCServer(addr string, opts ...GrpcOption) app.IServer
- func NewHTTPServer(addr string, opts ...HTTPOption) app.IServer
- func NewHTTPServer_pbExample(addr string, opts ...HTTPOption) app.IServer
- func NewRabbitmqConsumerServer(consumers []mq.Consumer, opts ...CRONOption) app.IServer
- type CRONOption
- type GrpcOption
- type HTTPOption
- type RABBITQMCONSUMEROption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCronServer ¶ added in v1.3.8
func NewCronServer(tasks []*gocron.Task, opts ...CRONOption) app.IServer
NewCronServer creates a new cron server
func NewGRPCServer ¶
func NewGRPCServer(addr string, opts ...GrpcOption) app.IServer
NewGRPCServer creates a new grpc server
func NewHTTPServer ¶
func NewHTTPServer(addr string, opts ...HTTPOption) app.IServer
NewHTTPServer creates a new http server
func NewHTTPServer_pbExample ¶
func NewHTTPServer_pbExample(addr string, opts ...HTTPOption) app.IServer
NewHTTPServer_pbExample creates a new web server
func NewRabbitmqConsumerServer ¶ added in v1.3.8
func NewRabbitmqConsumerServer(consumers []mq.Consumer, opts ...CRONOption) app.IServer
NewRabbitmqConsumerServer 创建新的RabbitMQ消费者服务
Types ¶
type CRONOption ¶ added in v1.3.8
type CRONOption func(*cronOptions)
CRONOption setting up cron
func WithCRONRegistry ¶ added in v1.3.8
func WithCRONRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) CRONOption
WithCRONRegistry registration services
type GrpcOption ¶
type GrpcOption func(*grpcOptions)
GrpcOption grpc settings
func WithGrpcRegistry ¶
func WithGrpcRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) GrpcOption
WithGrpcRegistry registration services
type HTTPOption ¶
type HTTPOption func(*httpOptions)
HTTPOption setting up http
func WithHTTPIsProd ¶
func WithHTTPIsProd(isProd bool) HTTPOption
WithHTTPIsProd setting up production environment markers
func WithHTTPRegistry ¶
func WithHTTPRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) HTTPOption
WithHTTPRegistry registration services
type RABBITQMCONSUMEROption ¶ added in v1.3.8
type RABBITQMCONSUMEROption func(*rabbitmqConsumerOptions)
RABBITQMCONSUMEROption setting up rabbitmqConsumer
func WithRABBITQMCONSUMERRegistry ¶ added in v1.3.8
func WithRABBITQMCONSUMERRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) RABBITQMCONSUMEROption
WithRABBITQMCONSUMERRegistry registration services
Click to show internal directories.
Click to hide internal directories.