Documentation ¶
Index ¶
- func NewManager(ctx context.Context, store store.Store, logger *slog.Logger, dialAddr string, ...) endpoints.Manager
- func RunHTTPServer(m endpoints.Manager, logger *slog.Logger, lis net.Listener, ...) error
- type HttpClient
- func (h *HttpClient) ActivateComponent(ctx context.Context, req *nanny.ActivateComponentRequest) error
- func (h *HttpClient) Delete(ctx context.Context, req *nanny.ApplicationDeleteRequest) error
- func (h *HttpClient) Deploy(ctx context.Context, req *nanny.ApplicationDeploymentRequest) error
- func (h *HttpClient) ExportListener(ctx context.Context, req *nanny.ExportListenerRequest) (*protos.ExportListenerReply, error)
- func (h *HttpClient) GetComponentsToStart(ctx context.Context, req *nanny.GetComponentsRequest) (*nanny.GetComponentsReply, error)
- func (h *HttpClient) GetListenerAddress(ctx context.Context, req *nanny.GetListenerAddressRequest) (*protos.GetListenerAddressReply, error)
- func (h *HttpClient) GetReplicaSetState(ctx context.Context, req *nanny.GetReplicaSetStateRequest) (*nanny.ReplicaSetState, error)
- func (h *HttpClient) GetRoutingInfo(ctx context.Context, req *nanny.GetRoutingRequest) (*nanny.GetRoutingReply, error)
- func (h *HttpClient) RegisterReplica(ctx context.Context, req *nanny.RegisterReplicaRequest) error
- func (h *HttpClient) ReportLoad(ctx context.Context, req *nanny.LoadReport) error
- func (h *HttpClient) Stop(ctx context.Context, req *nanny.ApplicationStopRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶ added in v0.18.0
func NewManager(ctx context.Context, store store.Store, logger *slog.Logger, dialAddr string, babysitterConstructor func(cfg *config.GKEConfig, replicaSet, addr string) (endpoints.Babysitter, error), replicaExists func(context.Context, string) (bool, error), getListenerPort func(context.Context, *config.GKEConfig, string, string) (int, error), exportListener func(context.Context, *config.GKEConfig, string, *nanny.Listener) (*protos.ExportListenerReply, error), startReplicaSet func(context.Context, *config.GKEConfig, string) error, stopAppVersions func(context.Context, string, []*config.GKEConfig) error, deleteAppVersions func(context.Context, string, []*config.GKEConfig) error) endpoints.Manager
NewManager returns a new manager instance.
func RunHTTPServer ¶ added in v0.18.0
func RunHTTPServer(m endpoints.Manager, logger *slog.Logger, lis net.Listener, getSelfCert func() ([]byte, []byte, error), verifyPeerCert func([]*x509.Certificate) (string, error)) error
RunHTTPServer runs the HTTP server that handles requests for the given manager.
Types ¶
type HttpClient ¶
type HttpClient struct { Addr string // manager address TLSConfig *tls.Config // TLS config, possibly nil. }
HttpClient is a Client that executes requests over HTTP.
func (*HttpClient) ActivateComponent ¶ added in v0.2.0
func (h *HttpClient) ActivateComponent(ctx context.Context, req *nanny.ActivateComponentRequest) error
ActivateComponent implements the endpoints.Manager interface.
func (*HttpClient) Delete ¶
func (h *HttpClient) Delete(ctx context.Context, req *nanny.ApplicationDeleteRequest) error
Delete implements the endpoints.Manager interface.
func (*HttpClient) Deploy ¶
func (h *HttpClient) Deploy(ctx context.Context, req *nanny.ApplicationDeploymentRequest) error
Deploy implements the endpoints.Manager interface.
func (*HttpClient) ExportListener ¶
func (h *HttpClient) ExportListener(ctx context.Context, req *nanny.ExportListenerRequest) (*protos.ExportListenerReply, error)
ExportListener implements the endpoints.Manager interface.
func (*HttpClient) GetComponentsToStart ¶
func (h *HttpClient) GetComponentsToStart(ctx context.Context, req *nanny.GetComponentsRequest) ( *nanny.GetComponentsReply, error)
GetComponentsToStart implements the endpoints.Manager interface.
func (*HttpClient) GetListenerAddress ¶ added in v0.1.3
func (h *HttpClient) GetListenerAddress(ctx context.Context, req *nanny.GetListenerAddressRequest) (*protos.GetListenerAddressReply, error)
GetListenerAddress implements the endpoints.Manager interface.
func (*HttpClient) GetReplicaSetState ¶ added in v0.2.0
func (h *HttpClient) GetReplicaSetState(ctx context.Context, req *nanny.GetReplicaSetStateRequest) (*nanny.ReplicaSetState, error)
GetReplicaSetState implements the endpoints.Manager interface.
func (*HttpClient) GetRoutingInfo ¶
func (h *HttpClient) GetRoutingInfo(ctx context.Context, req *nanny.GetRoutingRequest) (*nanny.GetRoutingReply, error)
GetRoutingInfo implements the endpoints.Manager interface.
func (*HttpClient) RegisterReplica ¶
func (h *HttpClient) RegisterReplica(ctx context.Context, req *nanny.RegisterReplicaRequest) error
RegisterReplica implements the endpoints.Manager interface.
func (*HttpClient) ReportLoad ¶
func (h *HttpClient) ReportLoad(ctx context.Context, req *nanny.LoadReport) error
ReportLoad implements the endpoints.Manager interface.
func (*HttpClient) Stop ¶
func (h *HttpClient) Stop(ctx context.Context, req *nanny.ApplicationStopRequest) error
Stop implements the endpoints.Manager interface.