Documentation ¶
Index ¶
- Variables
- func RegisterDirectorServer(s *grpc.Server, srv DirectorServer)
- type Command
- type Directive
- func (*Directive) Descriptor() ([]byte, []int)deprecated
- func (x *Directive) GetCommands() []*Command
- func (x *Directive) GetID() string
- func (x *Directive) GetMinReportPeriod() *duration.Duration
- func (x *Directive) GetStopReporting() bool
- func (*Directive) ProtoMessage()
- func (x *Directive) ProtoReflect() protoreflect.Message
- func (x *Directive) Reset()
- func (x *Directive) String() string
- type DirectorClient
- type DirectorServer
- type Director_RetrieveClient
- type Director_RetrieveServer
- type Identity
- func (*Identity) Descriptor() ([]byte, []int)deprecated
- func (x *Identity) GetAccountId() string
- func (x *Identity) GetClusterId() string
- func (x *Identity) GetHostname() string
- func (x *Identity) GetLabel() string
- func (x *Identity) GetLicense() string
- func (x *Identity) GetVersion() string
- func (*Identity) ProtoMessage()
- func (x *Identity) ProtoReflect() protoreflect.Message
- func (x *Identity) Reset()
- func (x *Identity) String() string
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetAnnotations() map[string]string
- func (x *Service) GetLabels() map[string]string
- func (x *Service) GetName() string
- func (x *Service) GetNamespace() string
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)deprecated
- func (x *Snapshot) GetIdentity() *Identity
- func (x *Snapshot) GetMessage() string
- func (x *Snapshot) GetServices() []*Service
- func (*Snapshot) ProtoMessage()
- func (x *Snapshot) ProtoReflect() protoreflect.Message
- func (x *Snapshot) Reset()
- func (x *Snapshot) String() string
- type SnapshotResponse
- type UnimplementedDirectorServer
Constants ¶
This section is empty.
Variables ¶
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"` // contains filtered or unexported fields }
An individual instruction from the CEPC
func (*Command) Descriptor
deprecated
func (*Command) GetMessage ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
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) GetCommands ¶
func (*Directive) GetMinReportPeriod ¶
func (*Directive) GetStopReporting ¶
func (*Directive) ProtoMessage ¶
func (*Directive) ProtoMessage()
func (*Directive) ProtoReflect ¶
func (x *Directive) ProtoReflect() protoreflect.Message
type DirectorClient ¶
type DirectorClient interface { // Report a consistent Snapshot of information to the CEPC Report(ctx context.Context, in *Snapshot, opts ...grpc.CallOption) (*SnapshotResponse, error) // Retrieve Directives from the CEPC Retrieve(ctx context.Context, in *Identity, opts ...grpc.CallOption) (Director_RetrieveClient, 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 { // Report a consistent Snapshot of information to the CEPC Report(context.Context, *Snapshot) (*SnapshotResponse, error) // Retrieve Directives from the CEPC Retrieve(*Identity, Director_RetrieveServer) error }
DirectorServer is the server API for Director service.
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 Identity ¶
type Identity struct { // The account ID assigned by the CEPC AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Ambassador version 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 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
func (*Identity) Descriptor
deprecated
func (*Identity) GetAccountId ¶
func (*Identity) GetClusterId ¶
func (*Identity) GetHostname ¶
func (*Identity) GetLicense ¶
func (*Identity) GetVersion ¶
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
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) GetAnnotations ¶
func (*Service) GetNamespace ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
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"` Services []*Service `protobuf:"bytes,3,rep,name=services,proto3" json:"services,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) GetIdentity ¶
func (*Snapshot) GetMessage ¶
func (*Snapshot) GetServices ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) ProtoReflect ¶
func (x *Snapshot) ProtoReflect() protoreflect.Message
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) Report(context.Context, *Snapshot) (*SnapshotResponse, error)
func (*UnimplementedDirectorServer) Retrieve ¶
func (*UnimplementedDirectorServer) Retrieve(*Identity, Director_RetrieveServer) error