Documentation
¶
Index ¶
- Constants
- func NewContext(ctx context.Context, s AppInfo) context.Context
- type App
- type AppInfo
- type Option
- func Context(ctx context.Context) Option
- func Endpoint(endpoints ...*url.URL) Option
- func ID(id string) Option
- func Logger(logger log.Logger) Option
- func Metadata(md map[string]string) Option
- func Name(name string) Option
- func Registrar(r registry.Registrar) Option
- func RegistrarTimeout(t time.Duration) Option
- func Server(srv ...transport.Server) Option
- func Signal(sigs ...os.Signal) Option
- func Version(version string) Option
Constants ¶
View Source
const Release = "v0.0.0"
Release 当前good的版本
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is an application components lifecycle manager.
type AppInfo ¶
type AppInfo interface {
ID() string
Name() string
Version() string
Metadata() map[string]string
Endpoint() []string
}
AppInfo is application context value.
type Option ¶
type Option func(o *options)
func RegistrarTimeout ¶
RegistrarTimeout with registrar timeout.
Directories
¶
| Path | Synopsis |
|---|---|
|
api
|
|
|
container
|
|
|
group
Package group provides a sample lazy load container.
|
Package group provides a sample lazy load container. |
|
contrib
|
|
|
config/apollo
module
|
|
|
config/etcd
module
|
|
|
config/kubernetes
module
|
|
|
config/nacos
module
|
|
|
encoding/msgpack
module
|
|
|
log/fluent
module
|
|
|
log/zap
module
|
|
|
metrics/datadog
module
|
|
|
metrics/prometheus
module
|
|
|
registry/consul
module
|
|
|
registry/discovery
module
|
|
|
registry/etcd
module
|
|
|
registry/kubernetes
module
|
|
|
registry/nacos
module
|
|
|
registry/zookeeper
module
|
|
|
proto
Package proto defines the protobuf codec.
|
Package proto defines the protobuf codec. |
|
nolint:gomnd
|
nolint:gomnd |
|
internal
|
|
Click to show internal directories.
Click to hide internal directories.