Documentation ¶
Index ¶
- func GracefulShutdown(s os.Signal)
- func HijackGracefulShutdown(f func(os.Signal))
- func HijackSignal(sigs ...os.Signal)
- func Init() error
- func InstallPostShutdown(name string, f func(os.Signal))
- func InstallPreShutdown(name string, f func(os.Signal))
- func RegisterSchema(serverName string, structPtr interface{}, opts ...server.RegisterOption)
- func Run(options ...server.RunOption) error
- func SetDefaultConsumerChains(c map[string]string)
- func SetDefaultProviderChains(c map[string]string)
- type Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HijackGracefulShutdown ¶ added in v2.1.0
HijackGracefulShutdown reset GracefulShutdown
func HijackSignal ¶ added in v2.1.0
HijackSignal set signals that want to hijack.
func InstallPostShutdown ¶ added in v2.1.0
InstallPostShutdown instal what you want to achieve after graceful shutdown
func InstallPreShutdown ¶ added in v2.1.0
InstallPreShutdown instal what you want to achieve before graceful shutdown
func RegisterSchema ¶
func RegisterSchema(serverName string, structPtr interface{}, opts ...server.RegisterOption)
RegisterSchema Register a API service to specific server by name You must register API first before Call Init
func Run ¶
Run bring up the service,it waits for os signal,and shutdown gracefully before all protocol server start successfully, it may return error.
func SetDefaultConsumerChains ¶
SetDefaultConsumerChains your custom chain map for Consumer,if there is no config, this default chain will take affect
func SetDefaultProviderChains ¶
SetDefaultProviderChains set your custom chain map for Provider,if there is no config, this default chain will take affect
Types ¶
Directories ¶
Path | Synopsis |
---|---|
client
|
|
client
Package client is an interface for any protocol's client
|
Package client is an interface for any protocol's client |
loadbalancer
Package loadbalancer is client side load balancer
|
Package loadbalancer is client side load balancer |
metadata
Package metadata provides framework info registered to registry.
|
Package metadata provides framework info registered to registry. |
router
Package router expose API for user to get or set route rule
|
Package router expose API for user to get or set route rule |
server
Package server is a package for protocol of a micro service
|
Package server is a package for protocol of a micro service |
examples
|
|
schemas/employ
Package employ is a generated protocol buffer package.
|
Package employ is a generated protocol buffer package. |
schemas/helloworld
Package helloworld is a generated protocol buffer package.
|
Package helloworld is a generated protocol buffer package. |
Package initiator init necessary module before every other package init functions
|
Package initiator init necessary module before every other package init functions |
middleware
|
|
basicauth
Package basicauth supply basicAuth middleware abstraction
|
Package basicauth supply basicAuth middleware abstraction |
pkg
|
|
backends/quota
Package quota is a alpha feature.
|
Package quota is a alpha feature. |
codec
Package quota is a alpha feature.
|
Package quota is a alpha feature. |
resilience
|
|
rate
Package rate supply functionality about QPS for example rate limiting
|
Package rate supply functionality about QPS for example rate limiting |
security
|
|
authr
Package authr defines a standard interface to decouple with specify auth solution.
|
Package authr defines a standard interface to decouple with specify auth solution. |
cipher/plugins/plain
Package plain created on 2017/6/22
|
Package plain created on 2017/6/22 |
server
|
|
restful/api
Package api supply a bunch of common http handler that could be mounted on you rest server and expose ability for example: prometheus metrics will be exported on /metrics api
|
Package api supply a bunch of common http handler that could be mounted on you rest server and expose ability for example: prometheus metrics will be exported on /metrics api |
third_party
|
|
forked/afex/hystrix-go/hystrix
Package hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
|
Package hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable. |