Documentation ¶
Index ¶
- type Application
- func (app *Application) Campus() string
- func (app *Application) Endpoints() []types.ServerInfo
- func (app *Application) Init(opts ...Option)
- func (app *Application) Metadata() map[string]string
- func (app *Application) Name() string
- func (app *Application) Namespace() string
- func (app *Application) Region() string
- func (app *Application) Run() error
- func (app *Application) Stop() error
- func (app *Application) Version() string
- func (app *Application) Zone() string
- type Option
- func WithAfterStopHook(fns ...func() error) Option
- func WithBeforeStopHook(fns ...func() error) Option
- func WithHook(stage Stage, fns ...func() error) Option
- func WithRegistry(registry types.Registry) Option
- func WithServers(servers ...types.Server) Option
- func WithShutdownTimeout(timeout time.Duration) Option
- type Stage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(inits ...Option) *Application
func (*Application) Campus ¶
func (app *Application) Campus() string
func (*Application) Endpoints ¶
func (app *Application) Endpoints() []types.ServerInfo
func (*Application) Init ¶
func (app *Application) Init(opts ...Option)
func (*Application) Metadata ¶
func (app *Application) Metadata() map[string]string
func (*Application) Name ¶
func (app *Application) Name() string
func (*Application) Namespace ¶
func (app *Application) Namespace() string
func (*Application) Region ¶
func (app *Application) Region() string
func (*Application) Run ¶
func (app *Application) Run() error
func (*Application) Stop ¶
func (app *Application) Stop() error
func (*Application) Version ¶
func (app *Application) Version() string
func (*Application) Zone ¶
func (app *Application) Zone() string
type Option ¶
type Option func(*Application) error
func WithAfterStopHook ¶
func WithBeforeStopHook ¶
func WithRegistry ¶
func WithServers ¶
func WithShutdownTimeout ¶
Click to show internal directories.
Click to hide internal directories.