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 HostName(hostName string) 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 StopTimeout(t time.Duration) Option
- func Version(version string) Option
Constants ¶
View Source
const Release = "v1.0.0"
Release is the current mars version.
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)
Option is an application option.
func RegistrarTimeout ¶
RegistrarTimeout with registrar timeout.
Directories ¶
Path | Synopsis |
---|---|
api
|
|
cmd
|
|
mars
Module
|
|
protoc-gen-go-errors
Module
|
|
protoc-gen-go-mars-errors
Module
|
|
protoc-gen-go-mars-http
Module
|
|
protoc-gen-mars-errors
Module
|
|
protoc-gen-mars-http
Module
|
|
contrib
|
|
config/apollo
Module
|
|
config/consul
Module
|
|
config/etcd
Module
|
|
config/kubernetes
Module
|
|
config/nacos
Module
|
|
config/polaris
Module
|
|
encoding/msgpack
Module
|
|
log/aliyun
Module
|
|
log/fluent
Module
|
|
log/logrus
Module
|
|
log/tencent
Module
|
|
log/zap
Module
|
|
metrics/datadog
Module
|
|
metrics/prometheus
Module
|
|
opensergo
Module
|
|
registry/consul
Module
|
|
registry/discovery
Module
|
|
registry/etcd
Module
|
|
registry/eureka
Module
|
|
registry/kubernetes
Module
|
|
registry/nacos
Module
|
|
registry/polaris
Module
|
|
registry/servicecomb
Module
|
|
registry/zookeeper
Module
|
|
proto
Package proto defines the protobuf codec.
|
Package proto defines the protobuf codec. |
nolint:gomnd
|
nolint:gomnd |
internal
|
|
group
Package group provides a sample lazy load container.
|
Package group provides a sample lazy load container. |
pkg
|
|
plugin
|
|
registry/kubernetes
Package kuberegistry registry simply implements the Kubernetes-based Registry
|
Package kuberegistry registry simply implements the Kubernetes-based Registry |
Click to show internal directories.
Click to hide internal directories.