Documentation ¶
Index ¶
- Constants
- func NewContext(ctx context.Context, a Application) context.Context
- type App
- type Application
- 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 Context(ctx context.Context) Option
- func Endpoints(ep ...*url.URL) Option
- func ID(id string) Option
- func Logger(l 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 Servers(svr ...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 rushgo version.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(ctx context.Context, a Application) context.Context
NewContext returns a new Context that carries value
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is an application component's lifecycle manager.
type Application ¶
type Application interface { ID() string Name() string Version() string Metadata() map[string]string Endpoint() []string }
func FromContext ¶
func FromContext(ctx context.Context) (a Application, ok bool)
FromContext returns the Transport value stored in ctx, if any
Directories ¶
Path | Synopsis |
---|---|
contrib
|
|
registry/kubernetes
Package kuberegister registry simply implements the kubernetes-base Registry
|
Package kuberegister registry simply implements the kubernetes-base Registry |
internal
|
|
trace/grpc_trace
Package grpc_trace
|
Package grpc_trace |
Click to show internal directories.
Click to hide internal directories.