manager

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context,
	mux *http.ServeMux,
	store store.Store,
	logger *slog.Logger,
	dialAddr string,
	babysitterConstructor func(string) clients.BabysitterClient,
	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, []string) error,
	deleteAppVersions func(context.Context, string, []string) error) error

Start starts the manager service and registers its handlers with the given request multiplexer.

Types

type HttpClient

type HttpClient struct {
	Addr string // manager address
}

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 clients.ManagerClient interface.

func (*HttpClient) Delete

Delete implements the clients.ManagerClient interface.

func (*HttpClient) Deploy

Deploy implements the clients.ManagerClient interface.

func (*HttpClient) ExportListener

ExportListener implements the clients.ManagerClient interface.

func (*HttpClient) GetComponentsToStart

func (h *HttpClient) GetComponentsToStart(ctx context.Context, req *nanny.GetComponentsRequest) (
	*nanny.GetComponentsReply, error)

GetComponentsToStart implements the clients.ManagerClient interface.

func (*HttpClient) GetListenerAddress added in v0.1.3

GetListenerAddress implements the clients.ManagerClient 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 clients.ManagerClient interface.

func (*HttpClient) GetRoutingInfo

func (h *HttpClient) GetRoutingInfo(ctx context.Context, req *nanny.GetRoutingRequest) (*nanny.GetRoutingReply, error)

GetRoutingInfo implements the clients.ManagerClient interface.

func (*HttpClient) RegisterReplica

func (h *HttpClient) RegisterReplica(ctx context.Context, req *nanny.RegisterReplicaRequest) error

RegisterReplica implements the clients.ManagerClient interface.

func (*HttpClient) ReportLoad

func (h *HttpClient) ReportLoad(ctx context.Context, req *nanny.LoadReport) error

ReportLoad implements the clients.ManagerClient interface.

func (*HttpClient) Stop

Stop implements the clients.ManagerClient interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL