Documentation ¶
Index ¶
- Constants
- func Apply(opts ...Option) *options
- func NewContext(ctx context.Context, s AppInfo) context.Context
- type AppInfo
- type Gaia
- type Option
- func AfterStart(fn func(context.Context) error) Option
- func AfterStop(fn func(context.Context) error) Option
- func BeforeStart(fn func(context.Context) error) Option
- func BeforeStop(fn func(context.Context) error) Option
- func WithContext(ctx context.Context) Option
- func WithEndpoint(endpoints ...*url.URL) Option
- func WithID(id string) Option
- func WithLogger(logger log.Logger) Option
- func WithMetadata(md map[string]string) Option
- func WithName(name string) Option
- func WithRegistry(r registry.Registry) Option
- func WithRegistryTimeout(t time.Duration) Option
- func WithServer(srv ...transport.Server) Option
- func WithSignal(sigs ...os.Signal) Option
- func WithStopTimeout(t time.Duration) Option
- func WithVersion(version string) Option
Constants ¶
View Source
const ( Name = "Gaia" Version = "v1.9.0" )
Name and Version info of this framework, used for statistics and debug
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppInfo ¶
type Gaia ¶
type Gaia struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(o *options)
Option is an application option.
func AfterStart ¶
AfterStart run funcs after app starts
func BeforeStart ¶
BeforeStart run funcs before app starts
func BeforeStop ¶
BeforeStop run funcs before app stops
func WithEndpoint ¶
WithEndpoint with service endpoint.
func WithMetadata ¶
WithMetadata with service metadata.
func WithRegistry ¶
WithRegistry with service registry.
func WithRegistryTimeout ¶
WithRegistryTimeout with registrar timeout.
func WithServer ¶
WithServer with a server , http or grpc
func WithStopTimeout ¶
WithStopTimeout with app stop timeout.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
gaia
Module
|
|
protoc-gen-go-gin
Module
|
|
internal
|
|
pkg
module
|
|
plugins
|
|
registry/consul
Module
|
|
registry/etcd
Module
|
|
registry/k8s
Module
|
|
registry/nacos
Module
|
|
transport/fasthttp
Module
|
|
transport/hertz
Module
|
|
transport/websocket
Module
|
|
Click to show internal directories.
Click to hide internal directories.