Documentation ¶
Index ¶
- Constants
- Variables
- func Create(opts ...Option) error
- type Mode
- type Option
- func Address(val string) Option
- func Advertise(val string) Option
- func BindRoute(val func(*gin.Engine)) Option
- func CallFunc(val func(service micro.Service)) Option
- func Init(val []micro.Option) Option
- func Name(val string) Option
- func RabbitmqBroker(val bool) Option
- func ServerType(val Mode) Option
- func SetOption(k, v interface{}) Option
- type Options
Constants ¶
View Source
const CALL_FUNC_IS_NULL = "create service: The CallFunc cannot be empty~"
View Source
const SERVICE_NAME_IS_NULL = "create service: The ServiceName cannot be empty!"
Variables ¶
Functions ¶
Types ¶
type Option ¶
type Option func(opts *Options)
func RabbitmqBroker ¶
func ServerType ¶ added in v1.0.8
type Options ¶
type Options struct { Context context.Context Name string // listen rpc addr RpcAddr string // listen http addr HttpAddr string // service registered address Advertise string Init []micro.Option CallFunc func(micro.Service) // use rabbitmq as the broker driver Rabbitmq bool // set server type ,RPC || HTTP ServerType Mode Server server.Server BindRoute func(*gin.Engine) }
Click to show internal directories.
Click to hide internal directories.