cmd

package
v2.11.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func RegisterControllerServer

func RegisterControllerServer(handler *Handler, server *grpc.Server, healthsrv *health.Server)

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

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,
) *Handler

NewHandler creates a new Handler.

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

GetDecisions returns decisions.

func (*Handler) GetStatus added in v2.11.0

GetStatus returns status of jobs in the system.

func (*Handler) ListAgents

func (h *Handler) ListAgents(
	ctx context.Context,
	_ *emptypb.Empty,
) (*cmdv1.ListAgentsResponse, error)

ListAgents lists all agents.

func (*Handler) ListAutoScaleControlPoints

ListAutoScaleControlPoints lists all AutoScaleControlPoints.

func (*Handler) ListDiscoveryEntities

ListDiscoveryEntities lists all Discovery entities.

func (*Handler) ListDiscoveryEntity

ListDiscoveryEntity lists all Discovery entity.

func (*Handler) ListFlowControlPoints

ListFlowControlPoints lists all FlowControlPoints.

func (*Handler) ListPolicies added in v2.8.0

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

PreviewFlowLabels previews flow labels.

func (*Handler) PreviewHTTPRequests

PreviewHTTPRequests previews HTTP requests.

func (*Handler) UpsertPolicy

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

UpsertPolicy creates/updates policies in the system.

Jump to

Keyboard shortcuts

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