Documentation ¶
Overview ¶
Package appmain contains the common application initialization code for Open Match servers.
Index ¶
- func RunApplication(serviceName string, bindService Bind)
- type App
- type Bind
- type Bindings
- func (b *Bindings) AddCloser(c func())
- func (b *Bindings) AddCloserErr(c func() error)
- func (b *Bindings) AddHandleFunc(handlerFunc rpc.GrpcHandler, grpcProxyHandler rpc.GrpcProxyHandler)
- func (b *Bindings) AddHealthCheckFunc(f func(context.Context) error)
- func (b *Bindings) RegisterViews(v ...*view.View)
- func (b *Bindings) TelemetryHandle(pattern string, handler http.Handler)
- func (b *Bindings) TelemetryHandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunApplication ¶
RunApplication starts and runs the given application forever. For use in main functions to run the full application.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is used internally, and public only for apptest. Do not use, and use apptest instead.
type Bindings ¶
type Bindings struct {
// contains filtered or unexported fields
}
Bindings allows applications to bind various functions to the running servers.
func (*Bindings) AddCloser ¶
func (b *Bindings) AddCloser(c func())
AddCloser specifies a function to be called when the application is being stopped. Closers are called in reverse order.
func (*Bindings) AddCloserErr ¶
AddCloserErr specifies a function to be called when the application is being stopped. Closers are called in reverse order. The first error returned by a closer will be logged.
func (*Bindings) AddHandleFunc ¶
func (b *Bindings) AddHandleFunc(handlerFunc rpc.GrpcHandler, grpcProxyHandler rpc.GrpcProxyHandler)
AddHandleFunc adds a protobuf service to the grpc server which is starting.
func (*Bindings) AddHealthCheckFunc ¶
AddHealthCheckFunc allows an application to check if it is healthy, and contribute to the overall server health.
func (*Bindings) RegisterViews ¶
RegisterViews begins collecting data for the given views.
func (*Bindings) TelemetryHandle ¶
TelemetryHandle adds a handler to the mux for serving debug info and metrics.
func (*Bindings) TelemetryHandleFunc ¶
func (b *Bindings) TelemetryHandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
TelemetryHandleFunc adds a handlerfunc to the mux for serving debug info and metrics.
type Params ¶
type Params struct {
// contains filtered or unexported fields
}
Params are inputs to starting an application.
func (*Params) ServiceName ¶
ServiceName is a name for the currently running binary specified by RunApplication.
Directories ¶
Path | Synopsis |
---|---|
Package apptest allows testing of binded services within memory.
|
Package apptest allows testing of binded services within memory. |