Documentation ¶
Overview ¶
Package api exposes application configurations via a gRPC API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Client configgrpc.ConfigAPIClient
}
Client wraps a configgrpc.ConfigAPIClient to unmarshal the server's responses into types that implement the core configkit configkit.Application and configkit.Handler interfaces.
func NewClient ¶
func NewClient(conn grpc.ClientConnInterface) *Client
NewClient returns a new configuration client for the given connection.
func (*Client) ListApplications ¶
ListApplications returns the configurations of the applications hosted by the server. The handler objects in the returned configuration are nil.
type Server ¶ added in v0.10.0
type Server struct {
// contains filtered or unexported fields
}
Server is an implementation of configspec.ConfigAPIServer.
func NewServer ¶ added in v0.10.0
func NewServer(apps ...configkit.Application) *Server
NewServer returns an API server that serves the configuration of the given applications.
func (*Server) ListApplications ¶ added in v0.10.0
func (s *Server) ListApplications( context.Context, *configgrpc.ListApplicationsRequest, ) (*configgrpc.ListApplicationsResponse, error)
ListApplications returns the full configuration of all applications.