agent

package
v2.2.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RolloutCommand_Action_name = map[int32]string{
		0: "PAUSE",
		1: "RESUME",
		2: "ABORT",
	}
	RolloutCommand_Action_value = map[string]int32{
		"PAUSE":  0,
		"RESUME": 1,
		"ABORT":  2,
	}
)

Enum value maps for RolloutCommand_Action.

View Source
var File_agent_director_proto protoreflect.FileDescriptor

Functions

func RegisterDirectorServer

func RegisterDirectorServer(s *grpc.Server, srv DirectorServer)

Types

type Command

type Command struct {

	// Log this message if present
	Message        string          `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	RolloutCommand *RolloutCommand `protobuf:"bytes,2,opt,name=rolloutCommand,proto3" json:"rolloutCommand,omitempty"`
	// contains filtered or unexported fields
}

An individual instruction from the CEPC

func (*Command) Descriptor deprecated

func (*Command) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetMessage

func (x *Command) GetMessage() string

func (*Command) GetRolloutCommand added in v2.2.0

func (x *Command) GetRolloutCommand() *RolloutCommand

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

func (x *Command) ProtoReflect() protoreflect.Message

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type CommandResult added in v2.2.0

type CommandResult struct {
	CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	Success   bool   `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	Message   string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandResult) Descriptor deprecated added in v2.2.0

func (*CommandResult) Descriptor() ([]byte, []int)

Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.

func (*CommandResult) GetCommandId added in v2.2.0

func (x *CommandResult) GetCommandId() string

func (*CommandResult) GetMessage added in v2.2.0

func (x *CommandResult) GetMessage() string

func (*CommandResult) GetSuccess added in v2.2.0

func (x *CommandResult) GetSuccess() bool

func (*CommandResult) ProtoMessage added in v2.2.0

func (*CommandResult) ProtoMessage()

func (*CommandResult) ProtoReflect added in v2.2.0

func (x *CommandResult) ProtoReflect() protoreflect.Message

func (*CommandResult) Reset added in v2.2.0

func (x *CommandResult) Reset()

func (*CommandResult) String added in v2.2.0

func (x *CommandResult) String() string

type CommandResultResponse added in v2.2.0

type CommandResultResponse struct {
	// contains filtered or unexported fields
}

func (*CommandResultResponse) Descriptor deprecated added in v2.2.0

func (*CommandResultResponse) Descriptor() ([]byte, []int)

Deprecated: Use CommandResultResponse.ProtoReflect.Descriptor instead.

func (*CommandResultResponse) ProtoMessage added in v2.2.0

func (*CommandResultResponse) ProtoMessage()

func (*CommandResultResponse) ProtoReflect added in v2.2.0

func (x *CommandResultResponse) ProtoReflect() protoreflect.Message

func (*CommandResultResponse) Reset added in v2.2.0

func (x *CommandResultResponse) Reset()

func (*CommandResultResponse) String added in v2.2.0

func (x *CommandResultResponse) String() string

type Directive

type Directive struct {
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// Stop sending snapshots. The default value (false) indicates that
	// snapshot should be sent.
	StopReporting bool `protobuf:"varint,2,opt,name=stop_reporting,json=stopReporting,proto3" json:"stop_reporting,omitempty"`
	// Minimum time to wait before pushing the next snapshot. The default
	// value (zero duration) indicates that the Agent should not modify
	// the existing report period.
	MinReportPeriod *duration.Duration `protobuf:"bytes,3,opt,name=min_report_period,json=minReportPeriod,proto3" json:"min_report_period,omitempty"`
	// Commands to execute
	Commands []*Command `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"`
	// contains filtered or unexported fields
}

Instructions that the CEPC can send to Ambassador

func (*Directive) Descriptor deprecated

func (*Directive) Descriptor() ([]byte, []int)

Deprecated: Use Directive.ProtoReflect.Descriptor instead.

func (*Directive) GetCommands

func (x *Directive) GetCommands() []*Command

func (*Directive) GetID

func (x *Directive) GetID() string

func (*Directive) GetMinReportPeriod

func (x *Directive) GetMinReportPeriod() *duration.Duration

func (*Directive) GetStopReporting

func (x *Directive) GetStopReporting() bool

func (*Directive) ProtoMessage

func (*Directive) ProtoMessage()

func (*Directive) ProtoReflect

func (x *Directive) ProtoReflect() protoreflect.Message

func (*Directive) Reset

func (x *Directive) Reset()

func (*Directive) String

func (x *Directive) String() string

type DirectorClient

type DirectorClient interface {
	// Deprecated: Do not use.
	// Report a consistent Snapshot of information to the CEPC.  This
	// method is deprecated, you should call ReportStream instead.
	Report(ctx context.Context, in *Snapshot, opts ...grpc.CallOption) (*SnapshotResponse, error)
	// Report a consistent Snapshot of information to the CEPC.
	ReportStream(ctx context.Context, opts ...grpc.CallOption) (Director_ReportStreamClient, error)
	// Retrieve Directives from the CEPC
	Retrieve(ctx context.Context, in *Identity, opts ...grpc.CallOption) (Director_RetrieveClient, error)
	// Reports the result of a command execution to the cloud
	ReportCommandResult(ctx context.Context, in *CommandResult, opts ...grpc.CallOption) (*CommandResultResponse, error)
	RetrieveSnapshot(ctx context.Context, in *Identity, opts ...grpc.CallOption) (Director_RetrieveSnapshotClient, error)
}

DirectorClient is the client API for Director service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDirectorClient

func NewDirectorClient(cc grpc.ClientConnInterface) DirectorClient

type DirectorServer

type DirectorServer interface {
	// Deprecated: Do not use.
	// Report a consistent Snapshot of information to the CEPC.  This
	// method is deprecated, you should call ReportStream instead.
	Report(context.Context, *Snapshot) (*SnapshotResponse, error)
	// Report a consistent Snapshot of information to the CEPC.
	ReportStream(Director_ReportStreamServer) error
	// Retrieve Directives from the CEPC
	Retrieve(*Identity, Director_RetrieveServer) error
	// Reports the result of a command execution to the cloud
	ReportCommandResult(context.Context, *CommandResult) (*CommandResultResponse, error)
	RetrieveSnapshot(*Identity, Director_RetrieveSnapshotServer) error
}

DirectorServer is the server API for Director service.

type Director_ReportStreamClient

type Director_ReportStreamClient interface {
	Send(*RawSnapshotChunk) error
	CloseAndRecv() (*SnapshotResponse, error)
	grpc.ClientStream
}

type Director_ReportStreamServer

type Director_ReportStreamServer interface {
	SendAndClose(*SnapshotResponse) error
	Recv() (*RawSnapshotChunk, error)
	grpc.ServerStream
}

type Director_RetrieveClient

type Director_RetrieveClient interface {
	Recv() (*Directive, error)
	grpc.ClientStream
}

type Director_RetrieveServer

type Director_RetrieveServer interface {
	Send(*Directive) error
	grpc.ServerStream
}

type Director_RetrieveSnapshotClient

type Director_RetrieveSnapshotClient interface {
	Recv() (*RawSnapshotChunk, error)
	grpc.ClientStream
}

type Director_RetrieveSnapshotServer

type Director_RetrieveSnapshotServer interface {
	Send(*RawSnapshotChunk) error
	grpc.ServerStream
}

type Identity

type Identity struct {

	// The account ID assigned by the CEPC
	//
	// Deprecated: Do not use.
	AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// Ambassador version
	//
	// Deprecated: Do not use.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// This Ambassador's hostname
	Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// License information
	License string `protobuf:"bytes,4,opt,name=license,proto3" json:"license,omitempty"`
	// The cluster ID, as determined by Ambassador
	ClusterId string `protobuf:"bytes,5,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Label or description for the user
	//
	// Deprecated: Do not use.
	Label string `protobuf:"bytes,6,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

How Ambassador's Agent identifies itself to the CEPC This is the identity of the ambassador the agent is reporting on behalf of no user account specific information should be contained in here

func (*Identity) Descriptor deprecated

func (*Identity) Descriptor() ([]byte, []int)

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetAccountId deprecated

func (x *Identity) GetAccountId() string

Deprecated: Do not use.

func (*Identity) GetClusterId

func (x *Identity) GetClusterId() string

func (*Identity) GetHostname

func (x *Identity) GetHostname() string

func (*Identity) GetLabel deprecated

func (x *Identity) GetLabel() string

Deprecated: Do not use.

func (*Identity) GetLicense

func (x *Identity) GetLicense() string

func (*Identity) GetVersion deprecated

func (x *Identity) GetVersion() string

Deprecated: Do not use.

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

func (x *Identity) ProtoReflect() protoreflect.Message

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

type RawSnapshotChunk

type RawSnapshotChunk struct {
	Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

RawSnapshotChunk is a fragment of a JSON serialization of a Snapshot protobuf object.

func (*RawSnapshotChunk) Descriptor deprecated

func (*RawSnapshotChunk) Descriptor() ([]byte, []int)

Deprecated: Use RawSnapshotChunk.ProtoReflect.Descriptor instead.

func (*RawSnapshotChunk) GetChunk

func (x *RawSnapshotChunk) GetChunk() []byte

func (*RawSnapshotChunk) ProtoMessage

func (*RawSnapshotChunk) ProtoMessage()

func (*RawSnapshotChunk) ProtoReflect

func (x *RawSnapshotChunk) ProtoReflect() protoreflect.Message

func (*RawSnapshotChunk) Reset

func (x *RawSnapshotChunk) Reset()

func (*RawSnapshotChunk) String

func (x *RawSnapshotChunk) String() string

type RolloutCommand added in v2.2.0

type RolloutCommand struct {
	Name      string                `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string                `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Action    RolloutCommand_Action `protobuf:"varint,3,opt,name=action,proto3,enum=agent.RolloutCommand_Action" json:"action,omitempty"`
	CommandId string                `protobuf:"bytes,4,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RolloutCommand) Descriptor deprecated added in v2.2.0

func (*RolloutCommand) Descriptor() ([]byte, []int)

Deprecated: Use RolloutCommand.ProtoReflect.Descriptor instead.

func (*RolloutCommand) GetAction added in v2.2.0

func (x *RolloutCommand) GetAction() RolloutCommand_Action

func (*RolloutCommand) GetCommandId added in v2.2.0

func (x *RolloutCommand) GetCommandId() string

func (*RolloutCommand) GetName added in v2.2.0

func (x *RolloutCommand) GetName() string

func (*RolloutCommand) GetNamespace added in v2.2.0

func (x *RolloutCommand) GetNamespace() string

func (*RolloutCommand) ProtoMessage added in v2.2.0

func (*RolloutCommand) ProtoMessage()

func (*RolloutCommand) ProtoReflect added in v2.2.0

func (x *RolloutCommand) ProtoReflect() protoreflect.Message

func (*RolloutCommand) Reset added in v2.2.0

func (x *RolloutCommand) Reset()

func (*RolloutCommand) String added in v2.2.0

func (x *RolloutCommand) String() string

type RolloutCommand_Action added in v2.2.0

type RolloutCommand_Action int32
const (
	RolloutCommand_PAUSE  RolloutCommand_Action = 0
	RolloutCommand_RESUME RolloutCommand_Action = 1
	RolloutCommand_ABORT  RolloutCommand_Action = 2
)

func (RolloutCommand_Action) Descriptor added in v2.2.0

func (RolloutCommand_Action) Enum added in v2.2.0

func (RolloutCommand_Action) EnumDescriptor deprecated added in v2.2.0

func (RolloutCommand_Action) EnumDescriptor() ([]byte, []int)

Deprecated: Use RolloutCommand_Action.Descriptor instead.

func (RolloutCommand_Action) Number added in v2.2.0

func (RolloutCommand_Action) String added in v2.2.0

func (x RolloutCommand_Action) String() string

func (RolloutCommand_Action) Type added in v2.2.0

type Service

type Service struct {
	Name        string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace   string            `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Labels      map[string]string `` /* 153-byte string literal not displayed */
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetAnnotations

func (x *Service) GetAnnotations() map[string]string

func (*Service) GetLabels

func (x *Service) GetLabels() map[string]string

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetNamespace

func (x *Service) GetNamespace() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type Snapshot

type Snapshot struct {
	Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	Message  string    `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// no longer used.
	//
	// Deprecated: Do not use.
	Services    []*Service `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"`
	RawSnapshot []byte     `protobuf:"bytes,4,opt,name=raw_snapshot,json=rawSnapshot,proto3" json:"raw_snapshot,omitempty"`
	// describes how the raw_snapshot is encoded
	ContentType string `protobuf:"bytes,5,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// api version of RawSnapshot
	ApiVersion string               `protobuf:"bytes,6,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
	SnapshotTs *timestamp.Timestamp `protobuf:"bytes,7,opt,name=snapshot_ts,json=snapshotTs,proto3" json:"snapshot_ts,omitempty"`
	// contains filtered or unexported fields
}

Information that Ambassador's Agent can send to the Director component of the CEPC

func (*Snapshot) Descriptor deprecated

func (*Snapshot) Descriptor() ([]byte, []int)

Deprecated: Use Snapshot.ProtoReflect.Descriptor instead.

func (*Snapshot) GetApiVersion

func (x *Snapshot) GetApiVersion() string

func (*Snapshot) GetContentType

func (x *Snapshot) GetContentType() string

func (*Snapshot) GetIdentity

func (x *Snapshot) GetIdentity() *Identity

func (*Snapshot) GetMessage

func (x *Snapshot) GetMessage() string

func (*Snapshot) GetRawSnapshot

func (x *Snapshot) GetRawSnapshot() []byte

func (*Snapshot) GetServices deprecated

func (x *Snapshot) GetServices() []*Service

Deprecated: Do not use.

func (*Snapshot) GetSnapshotTs

func (x *Snapshot) GetSnapshotTs() *timestamp.Timestamp

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) ProtoReflect

func (x *Snapshot) ProtoReflect() protoreflect.Message

func (*Snapshot) Reset

func (x *Snapshot) Reset()

func (*Snapshot) String

func (x *Snapshot) String() string

type SnapshotResponse

type SnapshotResponse struct {
	// contains filtered or unexported fields
}

The Director's response to a Snapshot from the Agent

func (*SnapshotResponse) Descriptor deprecated

func (*SnapshotResponse) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotResponse.ProtoReflect.Descriptor instead.

func (*SnapshotResponse) ProtoMessage

func (*SnapshotResponse) ProtoMessage()

func (*SnapshotResponse) ProtoReflect

func (x *SnapshotResponse) ProtoReflect() protoreflect.Message

func (*SnapshotResponse) Reset

func (x *SnapshotResponse) Reset()

func (*SnapshotResponse) String

func (x *SnapshotResponse) String() string

type UnimplementedDirectorServer

type UnimplementedDirectorServer struct {
}

UnimplementedDirectorServer can be embedded to have forward compatible implementations.

func (*UnimplementedDirectorServer) Report

func (*UnimplementedDirectorServer) ReportCommandResult added in v2.2.0

func (*UnimplementedDirectorServer) ReportStream

func (*UnimplementedDirectorServer) Retrieve

func (*UnimplementedDirectorServer) RetrieveSnapshot

Jump to

Keyboard shortcuts

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