Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Client client.IClient Server server.IServer // Before and After funcs BeforeStart []func() error // TODO 处理服务器启动后的事物 BeforeStop []func() error AfterStart []func() error AfterStop []func() error // Other options for implementations of the interface // can be stored in a context Context context.Context Signal bool Debug bool }
type IService ¶
type IService interface { // The service name Name() string // Config returns the current options Config() *Config // Client is used to call services Client() client.IClient // Server is for handling requests and events Server() server.IServer // Run the service Run() error // Stop() error // The service implementation String() string }
Service is an interface that wraps the lower level libraries within volts. Its a convenience method for building and initialising services.
type Option ¶
type Option func(*Config)
func Debug ¶
func Debug() Option
Client to be used for service under debug mode the port will keep at 35999
func Transport ¶
func Transport(t transport.ITransport) Option
Transport sets the transport for the Server and client and the underlying components
Directories ¶
Path | Synopsis |
---|---|
memory
Package memory provides a memory broker
|
Package memory provides a memory broker |
demo
|
|
web/hello_world
Module
|
|
handler
|
|
internal
|
|
acme
Package acme abstracts away various ACME libraries
|
Package acme abstracts away various ACME libraries |
acme/autocert
Package autocert is the ACME provider from golang.org/x/crypto/acme/autocert This provider does not take any config.
|
Package autocert is the ACME provider from golang.org/x/crypto/acme/autocert This provider does not take any config. |
backoff
Package backoff provides backoff functionality
|
Package backoff provides backoff functionality |
metadata
Package metadata is a way of defining message headers
|
Package metadata is a way of defining message headers |
pool
Package pool is a connection pool
|
Package pool is a connection pool |
cacher
Package cache provides a registry cache
|
Package cache provides a registry cache |
etcd
Package etcd provides an etcd service registry
|
Package etcd provides an etcd service registry |
Package socket provides a pseudo socket
|
Package socket provides a pseudo socket |
Click to show internal directories.
Click to hide internal directories.