service

package
v4.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGateway added in v4.0.5

func CreateGateway(opts *WebOptions) web.Service

创建网关服务

func CreateService

func CreateService(opts *ServiceOptions) micro.Service

func CreateWeb

func CreateWeb(opts *WebOptions) web.Service

func Logger

func Logger() *mlog.Logger

func RegisterServer

func RegisterServer(srv server.Server, registers ...RegisterServerFunc) error

Types

type RegisterServerFunc

type RegisterServerFunc func(srv server.Server) error

type ServiceOptions

type ServiceOptions struct {

	// PreServerHandlerWrappers 自定义 HandlerWrapper,在标准 HandlerWrapper 之前注册
	PreServerHandlerWrappers []server.HandlerWrapper

	// PostServerHandlerWrappers 自定义 HandlerWrapper,在标准 HandlerWrapper 之后注册
	PostServerHandlerWrappers []server.HandlerWrapper

	// PreClientWrappers 自定义 Client Wrapper,在标准 Wrapper 之前注册
	PreClientWrappers []client.Wrapper

	// PostClientWrappers 自定义 Client Wrapper,在标准 Wrapper 之前注册
	PostClientWrappers []client.Wrapper

	// ServiceOptions 其它 Service Option
	ServiceOptions []micro.Option
	// contains filtered or unexported fields
}

func NewServiceOptions

func NewServiceOptions(namespace, name string) *ServiceOptions

func (*ServiceOptions) FQDN

func (opts *ServiceOptions) FQDN() string

FQDN 返回微服务的全名

func (*ServiceOptions) GetBuildTime

func (opts *ServiceOptions) GetBuildTime() string

func (*ServiceOptions) GetGitCommit

func (opts *ServiceOptions) GetGitCommit() string

func (*ServiceOptions) GetGoVersion

func (opts *ServiceOptions) GetGoVersion() string

func (*ServiceOptions) GetProductName

func (opts *ServiceOptions) GetProductName() string

func (*ServiceOptions) GetProductVersion

func (opts *ServiceOptions) GetProductVersion() string

func (*ServiceOptions) ServiceMetadata

func (opts *ServiceOptions) ServiceMetadata() map[string]string

type WebOptions

type WebOptions struct {

	// WebOptions 其它 Web Option
	WebOptions []web.Option
	// contains filtered or unexported fields
}

func NewWebOptions

func NewWebOptions(namespace, name string) *WebOptions

func (*WebOptions) FQDN

func (opts *WebOptions) FQDN() string

FQDN 返回微服务的全名

func (*WebOptions) GetBuildTime

func (opts *WebOptions) GetBuildTime() string

func (*WebOptions) GetGitCommit

func (opts *WebOptions) GetGitCommit() string

func (*WebOptions) GetGoVersion

func (opts *WebOptions) GetGoVersion() string

func (*WebOptions) GetProductName

func (opts *WebOptions) GetProductName() string

func (*WebOptions) GetProductVersion

func (opts *WebOptions) GetProductVersion() string

func (*WebOptions) ServiceMetadata

func (opts *WebOptions) ServiceMetadata() map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL