Documentation ¶
Overview ¶
Package appmain provides a runtime harness for Codecahedron services.
Index ¶
- func NewExternalServiceProbe(c *Clients, services ...string) func(context.Context) error
- func Serve(serviceName string, bindFunc func(p *apiserver.ServerParams, s *Services))
- type ClientSource
- type Clients
- func (c *Clients) NewContext() context.Context
- func (c *Clients) NewDatastoreGRPC() (*grpc.ClientConn, func(), error)
- func (c *Clients) NewEncodeWorkerGRPC() (*grpc.ClientConn, func(), error)
- func (c *Clients) NewFilestoreGRPC() (*grpc.ClientConn, func(), error)
- func (c *Clients) NewLogstoreGRPC() (*grpc.ClientConn, func(), error)
- func (c *Clients) NewOperationsGRPC() (*grpc.ClientConn, func(), error)
- func (c *Clients) NewUserGRPC() (*grpc.ClientConn, func(), error)
- func (c *Clients) NewWorkerPoolGRPC() (*grpc.ClientConn, func(), error)
- type Services
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExternalServiceProbe ¶
NewExternalServiceProbe indicates that a service should depend on other external services.
Types ¶
type ClientSource ¶
type ClientSource interface { NewContext() context.Context Grpc(string) (*grpc.ClientConn, func(), error) GrpcAddress(string) string }
ClientSource provides service clients.
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
Clients is a gRPC connection factory for Codecahedron services.
func NewClients ¶
func NewClients(cfg util.ConfigView) *Clients
NewClients creates a new connection factory for communicating with any Codecahedron service.
func NewClientsFromSource ¶
func NewClientsFromSource(cs ClientSource) *Clients
NewClientsFromSource creates a new connection factory based on a ClientSource.
func (*Clients) NewContext ¶
NewContext provides a context suitable for communicating via gRPC/HTTP.
func (*Clients) NewDatastoreGRPC ¶
func (c *Clients) NewDatastoreGRPC() (*grpc.ClientConn, func(), error)
NewDatastoreGRPC returns a gRPC connection to datastore service.
func (*Clients) NewEncodeWorkerGRPC ¶
func (c *Clients) NewEncodeWorkerGRPC() (*grpc.ClientConn, func(), error)
NewEncodeWorkerGRPC returns a gRPC connection to encodeworker service.
func (*Clients) NewFilestoreGRPC ¶
func (c *Clients) NewFilestoreGRPC() (*grpc.ClientConn, func(), error)
NewFilestoreGRPC returns a gRPC connection to filestore service.
func (*Clients) NewLogstoreGRPC ¶
func (c *Clients) NewLogstoreGRPC() (*grpc.ClientConn, func(), error)
NewLogstoreGRPC returns a gRPC connection to logstore service.
func (*Clients) NewOperationsGRPC ¶
func (c *Clients) NewOperationsGRPC() (*grpc.ClientConn, func(), error)
NewOperationsGRPC returns a gRPC connection to operations service.
func (*Clients) NewUserGRPC ¶
func (c *Clients) NewUserGRPC() (*grpc.ClientConn, func(), error)
NewUserGRPC returns a gRPC connection to user service.
func (*Clients) NewWorkerPoolGRPC ¶
func (c *Clients) NewWorkerPoolGRPC() (*grpc.ClientConn, func(), error)
NewWorkerPoolGRPC returns a gRPC connection to workerpool service.
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
Services contains all cross-cutting services for Codecahedron applications.
func NewServices ¶
func NewServices(cfg util.ConfigView) *Services
NewServices configures and creates a services object for the application.
func (*Services) Clients ¶
Clients returns a service mapping/connection factory for all Codecahedron services.
func (*Services) Config ¶
func (svc *Services) Config() util.ConfigView
Config returns a view of the configuration.