cmd

package
v2.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(NewHandler),
	fx.Invoke(RegisterControllerServer),
)

Module is a module for running cmd.v1.Controller service.

Functions

func RegisterControllerServer

func RegisterControllerServer(in RegisterControllerServerIn)

RegisterControllerServer registers handler for cmd.v1.Controller service.

Types

type AutoScaleControlPointID

type AutoScaleControlPointID struct {
	APIVersion string
	Kind       string
	Namespace  string
	Name       string
}

AutoScaleControlPointID is a ControlPointID without an agent group.

func AutoScaleControlPointIDFromProto

func AutoScaleControlPointIDFromProto(protoCP *autoscalecontrolpointsv1.AutoScaleKubernetesControlPoint) AutoScaleControlPointID

AutoScaleControlPointIDFromProto creates ControlPointID from protobuf representation.

type GlobalAutoScaleControlPointID

type GlobalAutoScaleControlPointID struct {
	AutoScaleControlPointID
	AgentGroup string
}

GlobalAutoScaleControlPointID is a ControlPointID with an agent group.

func (GlobalAutoScaleControlPointID) ToProto

func (gcp GlobalAutoScaleControlPointID) ToProto() *cmdv1.GlobalAutoScaleControlPoint

ToProto converts ControlPointID to protobuf representation.

type Handler

type Handler struct {
	cmdv1.UnimplementedControllerServer
	// contains filtered or unexported fields
}

Handler is a gRPC server for the controller service.

func NewHandler

func NewHandler(
	agents agents.Agents,
	policyService *controlplane.PolicyService,
	statusService *apertureStatus.StatusService,
	etcdTransport *transport.EtcdTransportServer,
) *Handler

NewHandler creates a new Handler.

func (*Handler) CacheDelete added in v2.25.0

func (h *Handler) CacheDelete(ctx context.Context, req *cmdv1.GlobalCacheDeleteRequest) (*flowcontrolv1.CacheDeleteResponse, error)

CacheDelete deletes specified cache entries.

func (*Handler) CacheLookup added in v2.25.0

func (h *Handler) CacheLookup(ctx context.Context, req *cmdv1.GlobalCacheLookupRequest) (*flowcontrolv1.CacheLookupResponse, error)

CacheLookup lookups specified cache entries.

func (*Handler) CacheUpsert added in v2.25.0

func (h *Handler) CacheUpsert(ctx context.Context, req *cmdv1.GlobalCacheUpsertRequest) (*flowcontrolv1.CacheUpsertResponse, error)

CacheUpsert inserts or deletes specified cache entries.

func (*Handler) DeleteDynamicConfig added in v2.20.1

func (h *Handler) DeleteDynamicConfig(ctx context.Context, req *policylangv1.DeleteDynamicConfigRequest) (*emptypb.Empty, error)

DeleteDynamicConfig deletes dynamic-config of a policy.

func (*Handler) DeletePolicy

func (h *Handler) DeletePolicy(ctx context.Context, req *policylangv1.DeletePolicyRequest) (*emptypb.Empty, error)

DeletePolicy deletes policies from the system.

func (*Handler) GetDecisions added in v2.8.0

func (h *Handler) GetDecisions(ctx context.Context, req *policylangv1.GetDecisionsRequest) (*policylangv1.GetDecisionsResponse, error)

GetDecisions returns decisions.

func (*Handler) GetDynamicConfig added in v2.20.1

func (h *Handler) GetDynamicConfig(ctx context.Context, req *policylangv1.GetDynamicConfigRequest) (*policylangv1.GetDynamicConfigResponse, error)

GetDynamicConfig gets dynamic-config of a policy.

func (*Handler) GetPolicy added in v2.20.0

func (h *Handler) GetPolicy(ctx context.Context, req *policylangv1.GetPolicyRequest) (*policylangv1.GetPolicyResponse, error)

func (*Handler) GetStatus added in v2.11.0

func (h *Handler) GetStatus(ctx context.Context, req *statusv1.GroupStatusRequest) (*statusv1.GroupStatus, error)

GetStatus returns status of jobs in the system.

func (*Handler) ListAgents

func (h *Handler) ListAgents(
	ctx context.Context,
	req *cmdv1.ListAgentsRequest,
) (*cmdv1.ListAgentsResponse, error)

ListAgents lists all agents.

func (*Handler) ListAutoScaleControlPoints

func (h *Handler) ListAutoScaleControlPoints(
	ctx context.Context,
	_ *cmdv1.ListAutoScaleControlPointsRequest,
) (*cmdv1.ListAutoScaleControlPointsControllerResponse, error)

ListAutoScaleControlPoints lists all AutoScaleControlPoints.

func (*Handler) ListDiscoveryEntities

func (h *Handler) ListDiscoveryEntities(ctx context.Context, req *cmdv1.ListDiscoveryEntitiesRequest) (*cmdv1.ListDiscoveryEntitiesControllerResponse, error)

ListDiscoveryEntities lists all Discovery entities.

func (*Handler) ListDiscoveryEntity

func (h *Handler) ListDiscoveryEntity(ctx context.Context, req *cmdv1.ListDiscoveryEntityRequest) (*cmdv1.ListDiscoveryEntityAgentResponse, error)

ListDiscoveryEntity lists all Discovery entity.

func (*Handler) ListFlowControlPoints

func (h *Handler) ListFlowControlPoints(
	ctx context.Context,
	_ *cmdv1.ListFlowControlPointsRequest,
) (*cmdv1.ListFlowControlPointsControllerResponse, error)

ListFlowControlPoints lists all FlowControlPoints.

func (*Handler) ListPolicies added in v2.8.0

func (h *Handler) ListPolicies(ctx context.Context, _ *emptypb.Empty) (*policylangv1.GetPoliciesResponse, error)

ListPolicies returns all applied policies.

func (*Handler) PostDynamicConfig

func (h *Handler) PostDynamicConfig(ctx context.Context, req *policylangv1.PostDynamicConfigRequest) (*emptypb.Empty, error)

PostDynamicConfig updates dynamic-config in the system.

func (*Handler) PreviewFlowLabels

func (h *Handler) PreviewFlowLabels(
	ctx context.Context,
	req *cmdv1.PreviewFlowLabelsRequest,
) (*cmdv1.PreviewFlowLabelsControllerResponse, error)

PreviewFlowLabels previews flow labels.

func (*Handler) PreviewHTTPRequests

func (h *Handler) PreviewHTTPRequests(
	ctx context.Context,
	req *cmdv1.PreviewHTTPRequestsRequest,
) (*cmdv1.PreviewHTTPRequestsControllerResponse, error)

PreviewHTTPRequests previews HTTP requests.

func (*Handler) UpsertPolicy

func (h *Handler) UpsertPolicy(ctx context.Context, req *policylangv1.UpsertPolicyRequest) (*policylangv1.UpsertPolicyResponse, error)

UpsertPolicy creates/updates policies in the system.

type RegisterControllerServerIn added in v2.16.0

type RegisterControllerServerIn struct {
	fx.In
	Server       *grpc.Server `name:"default"`
	Handler      *Handler
	HealthServer *health.Server
}

RegisterControllerServerIn bundles and annotates parameters.

Directories

Path Synopsis
Server-side for handling agent functions
Server-side for handling agent functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳