Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMasterServer(s grpc.ServiceRegistrar, srv MasterServer)
- type CompletedRequestsRequest
- func (*CompletedRequestsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompletedRequestsRequest) GetClientId() string
- func (*CompletedRequestsRequest) ProtoMessage()
- func (x *CompletedRequestsRequest) ProtoReflect() protoreflect.Message
- func (x *CompletedRequestsRequest) Reset()
- func (x *CompletedRequestsRequest) String() string
- type CompletedRequestsResponse
- func (*CompletedRequestsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CompletedRequestsResponse) GetRequestIds() []int64
- func (*CompletedRequestsResponse) ProtoMessage()
- func (x *CompletedRequestsResponse) ProtoReflect() protoreflect.Message
- func (x *CompletedRequestsResponse) Reset()
- func (x *CompletedRequestsResponse) String() string
- type Config
- type CreateHuntRequest
- func (*CreateHuntRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateHuntRequest) GetClientIds() []string
- func (x *CreateHuntRequest) GetData() *TrafficRequestData
- func (x *CreateHuntRequest) GetLimit() uint64
- func (*CreateHuntRequest) ProtoMessage()
- func (x *CreateHuntRequest) ProtoReflect() protoreflect.Message
- func (x *CreateHuntRequest) Reset()
- func (x *CreateHuntRequest) String() string
- type CreateHuntResponse
- type FileRequestData
- func (*FileRequestData) Descriptor() ([]byte, []int)deprecated
- func (x *FileRequestData) GetMasterId() int64
- func (x *FileRequestData) GetName() string
- func (*FileRequestData) ProtoMessage()
- func (x *FileRequestData) ProtoReflect() protoreflect.Message
- func (x *FileRequestData) Reset()
- func (x *FileRequestData) String() string
- type FileResponseData
- func (*FileResponseData) Descriptor() ([]byte, []int)deprecated
- func (x *FileResponseData) GetMasterId() int64
- func (x *FileResponseData) GetName() string
- func (x *FileResponseData) GetSize() uint64
- func (*FileResponseData) ProtoMessage()
- func (x *FileResponseData) ProtoReflect() protoreflect.Message
- func (x *FileResponseData) Reset()
- func (x *FileResponseData) String() string
- type FileResponseInfo
- func (*FileResponseInfo) Descriptor() ([]byte, []int)deprecated
- func (x *FileResponseInfo) GetClientId() []byte
- func (x *FileResponseInfo) GetData() *FileResponseData
- func (*FileResponseInfo) ProtoMessage()
- func (x *FileResponseInfo) ProtoReflect() protoreflect.Message
- func (x *FileResponseInfo) Reset()
- func (x *FileResponseInfo) String() string
- type MasterClient
- type MasterServer
- type MessageInfo
- func (*MessageInfo) Descriptor() ([]byte, []int)deprecated
- func (x *MessageInfo) GetClientId() []byte
- func (x *MessageInfo) GetData() *TrafficResponseData
- func (*MessageInfo) ProtoMessage()
- func (x *MessageInfo) ProtoReflect() protoreflect.Message
- func (x *MessageInfo) Reset()
- func (x *MessageInfo) String() string
- type TrafficRequestData
- func (*TrafficRequestData) Descriptor() ([]byte, []int)deprecated
- func (x *TrafficRequestData) GetJitter() float32
- func (x *TrafficRequestData) GetMasterId() int64
- func (x *TrafficRequestData) GetMessageDelayMs() int64
- func (x *TrafficRequestData) GetMessageSize() int64
- func (x *TrafficRequestData) GetNumMessages() int64
- func (x *TrafficRequestData) GetRequestId() int64
- func (*TrafficRequestData) ProtoMessage()
- func (x *TrafficRequestData) ProtoReflect() protoreflect.Message
- func (x *TrafficRequestData) Reset()
- func (x *TrafficRequestData) String() string
- type TrafficResponseData
- func (*TrafficResponseData) Descriptor() ([]byte, []int)deprecated
- func (x *TrafficResponseData) GetData() []byte
- func (x *TrafficResponseData) GetFin() bool
- func (x *TrafficResponseData) GetMasterId() int64
- func (x *TrafficResponseData) GetRequestId() int64
- func (x *TrafficResponseData) GetResponseIndex() int64
- func (*TrafficResponseData) ProtoMessage()
- func (x *TrafficResponseData) ProtoReflect() protoreflect.Message
- func (x *TrafficResponseData) Reset()
- func (x *TrafficResponseData) String() string
- type UnimplementedMasterServer
- func (UnimplementedMasterServer) CompletedRequests(context.Context, *CompletedRequestsRequest) (*CompletedRequestsResponse, error)
- func (UnimplementedMasterServer) CreateHunt(context.Context, *CreateHuntRequest) (*CreateHuntResponse, error)
- func (UnimplementedMasterServer) RecordFileResponse(context.Context, *FileResponseInfo) (*fleetspeak.EmptyMessage, error)
- func (UnimplementedMasterServer) RecordTrafficResponse(context.Context, *MessageInfo) (*fleetspeak.EmptyMessage, error)
- type UnsafeMasterServer
Constants ¶
const ( Master_RecordTrafficResponse_FullMethodName = "/fleetspeak.frr.Master/RecordTrafficResponse" Master_RecordFileResponse_FullMethodName = "/fleetspeak.frr.Master/RecordFileResponse" Master_CompletedRequests_FullMethodName = "/fleetspeak.frr.Master/CompletedRequests" Master_CreateHunt_FullMethodName = "/fleetspeak.frr.Master/CreateHunt" )
Variables ¶
var File_fleetspeak_src_inttesting_frr_proto_fleetspeak_frr_frr_proto protoreflect.FileDescriptor
var Master_ServiceDesc = grpc.ServiceDesc{ ServiceName: "fleetspeak.frr.Master", HandlerType: (*MasterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RecordTrafficResponse", Handler: _Master_RecordTrafficResponse_Handler, }, { MethodName: "RecordFileResponse", Handler: _Master_RecordFileResponse_Handler, }, { MethodName: "CompletedRequests", Handler: _Master_CompletedRequests_Handler, }, { MethodName: "CreateHunt", Handler: _Master_CreateHunt_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "fleetspeak/src/inttesting/frr/proto/fleetspeak_frr/frr.proto", }
Master_ServiceDesc is the grpc.ServiceDesc for Master service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMasterServer ¶
func RegisterMasterServer(s grpc.ServiceRegistrar, srv MasterServer)
Types ¶
type CompletedRequestsRequest ¶
type CompletedRequestsRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // contains filtered or unexported fields }
func (*CompletedRequestsRequest) Descriptor
deprecated
func (*CompletedRequestsRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompletedRequestsRequest.ProtoReflect.Descriptor instead.
func (*CompletedRequestsRequest) GetClientId ¶
func (x *CompletedRequestsRequest) GetClientId() string
func (*CompletedRequestsRequest) ProtoMessage ¶
func (*CompletedRequestsRequest) ProtoMessage()
func (*CompletedRequestsRequest) ProtoReflect ¶
func (x *CompletedRequestsRequest) ProtoReflect() protoreflect.Message
func (*CompletedRequestsRequest) Reset ¶
func (x *CompletedRequestsRequest) Reset()
func (*CompletedRequestsRequest) String ¶
func (x *CompletedRequestsRequest) String() string
type CompletedRequestsResponse ¶
type CompletedRequestsResponse struct { RequestIds []int64 `protobuf:"varint,1,rep,packed,name=request_ids,json=requestIds,proto3" json:"request_ids,omitempty"` // contains filtered or unexported fields }
func (*CompletedRequestsResponse) Descriptor
deprecated
func (*CompletedRequestsResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompletedRequestsResponse.ProtoReflect.Descriptor instead.
func (*CompletedRequestsResponse) GetRequestIds ¶
func (x *CompletedRequestsResponse) GetRequestIds() []int64
func (*CompletedRequestsResponse) ProtoMessage ¶
func (*CompletedRequestsResponse) ProtoMessage()
func (*CompletedRequestsResponse) ProtoReflect ¶
func (x *CompletedRequestsResponse) ProtoReflect() protoreflect.Message
func (*CompletedRequestsResponse) Reset ¶
func (x *CompletedRequestsResponse) Reset()
func (*CompletedRequestsResponse) String ¶
func (x *CompletedRequestsResponse) String() string
type Config ¶
type Config struct { // The address to reach the master frr server over grpc. MasterServer string `protobuf:"bytes,1,opt,name=master_server,json=masterServer,proto3" json:"master_server,omitempty"` // contains filtered or unexported fields }
Contains the information needed to configure a frr server component.
func (*Config) Descriptor
deprecated
func (*Config) GetMasterServer ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type CreateHuntRequest ¶
type CreateHuntRequest struct { Data *TrafficRequestData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // If client_ids is empty, the request is considered a broadcast request with // specified limit, otherwise unicast requests are sent to the provided // clients. ClientIds []string `protobuf:"bytes,3,rep,name=client_ids,json=clientIds,proto3" json:"client_ids,omitempty"` // contains filtered or unexported fields }
func (*CreateHuntRequest) Descriptor
deprecated
func (*CreateHuntRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateHuntRequest.ProtoReflect.Descriptor instead.
func (*CreateHuntRequest) GetClientIds ¶
func (x *CreateHuntRequest) GetClientIds() []string
func (*CreateHuntRequest) GetData ¶
func (x *CreateHuntRequest) GetData() *TrafficRequestData
func (*CreateHuntRequest) GetLimit ¶
func (x *CreateHuntRequest) GetLimit() uint64
func (*CreateHuntRequest) ProtoMessage ¶
func (*CreateHuntRequest) ProtoMessage()
func (*CreateHuntRequest) ProtoReflect ¶
func (x *CreateHuntRequest) ProtoReflect() protoreflect.Message
func (*CreateHuntRequest) Reset ¶
func (x *CreateHuntRequest) Reset()
func (*CreateHuntRequest) String ¶
func (x *CreateHuntRequest) String() string
type CreateHuntResponse ¶
type CreateHuntResponse struct {
// contains filtered or unexported fields
}
func (*CreateHuntResponse) Descriptor
deprecated
func (*CreateHuntResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateHuntResponse.ProtoReflect.Descriptor instead.
func (*CreateHuntResponse) ProtoMessage ¶
func (*CreateHuntResponse) ProtoMessage()
func (*CreateHuntResponse) ProtoReflect ¶
func (x *CreateHuntResponse) ProtoReflect() protoreflect.Message
func (*CreateHuntResponse) Reset ¶
func (x *CreateHuntResponse) Reset()
func (*CreateHuntResponse) String ¶
func (x *CreateHuntResponse) String() string
type FileRequestData ¶
type FileRequestData struct { // An identifier used to identify the frr master instance // responsible for this. MasterId int64 `protobuf:"varint,1,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` // The name of the file to download. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
A FileRequest is sent from the server to the client and tells the client to attempt to download a file from the server.
func (*FileRequestData) Descriptor
deprecated
func (*FileRequestData) Descriptor() ([]byte, []int)
Deprecated: Use FileRequestData.ProtoReflect.Descriptor instead.
func (*FileRequestData) GetMasterId ¶
func (x *FileRequestData) GetMasterId() int64
func (*FileRequestData) GetName ¶
func (x *FileRequestData) GetName() string
func (*FileRequestData) ProtoMessage ¶
func (*FileRequestData) ProtoMessage()
func (*FileRequestData) ProtoReflect ¶
func (x *FileRequestData) ProtoReflect() protoreflect.Message
func (*FileRequestData) Reset ¶
func (x *FileRequestData) Reset()
func (*FileRequestData) String ¶
func (x *FileRequestData) String() string
type FileResponseData ¶
type FileResponseData struct { // An identifier used to identify the frr master instance // responsible for the underlying request. MasterId int64 `protobuf:"varint,1,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` // The name of the file that was downloaded. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The size of the file that was downloaded. Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
A FileResponse is sent from the client to the server and reports that the client successfully downloaded a file from the server.
func (*FileResponseData) Descriptor
deprecated
func (*FileResponseData) Descriptor() ([]byte, []int)
Deprecated: Use FileResponseData.ProtoReflect.Descriptor instead.
func (*FileResponseData) GetMasterId ¶
func (x *FileResponseData) GetMasterId() int64
func (*FileResponseData) GetName ¶
func (x *FileResponseData) GetName() string
func (*FileResponseData) GetSize ¶
func (x *FileResponseData) GetSize() uint64
func (*FileResponseData) ProtoMessage ¶
func (*FileResponseData) ProtoMessage()
func (*FileResponseData) ProtoReflect ¶
func (x *FileResponseData) ProtoReflect() protoreflect.Message
func (*FileResponseData) Reset ¶
func (x *FileResponseData) Reset()
func (*FileResponseData) String ¶
func (x *FileResponseData) String() string
type FileResponseInfo ¶
type FileResponseInfo struct { ClientId []byte `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Data *FileResponseData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FileResponseInfo) Descriptor
deprecated
func (*FileResponseInfo) Descriptor() ([]byte, []int)
Deprecated: Use FileResponseInfo.ProtoReflect.Descriptor instead.
func (*FileResponseInfo) GetClientId ¶
func (x *FileResponseInfo) GetClientId() []byte
func (*FileResponseInfo) GetData ¶
func (x *FileResponseInfo) GetData() *FileResponseData
func (*FileResponseInfo) ProtoMessage ¶
func (*FileResponseInfo) ProtoMessage()
func (*FileResponseInfo) ProtoReflect ¶
func (x *FileResponseInfo) ProtoReflect() protoreflect.Message
func (*FileResponseInfo) Reset ¶
func (x *FileResponseInfo) Reset()
func (*FileResponseInfo) String ¶
func (x *FileResponseInfo) String() string
type MasterClient ¶
type MasterClient interface { // RecordMessage records that a TrafficResponse message was received by // the FS server. RecordTrafficResponse(ctx context.Context, in *MessageInfo, opts ...grpc.CallOption) (*fleetspeak.EmptyMessage, error) // RecordFileResponse records that a FileResponse message was received // by the FS server. RecordFileResponse(ctx context.Context, in *FileResponseInfo, opts ...grpc.CallOption) (*fleetspeak.EmptyMessage, error) // CompletedRequests returns a list of requests made to a client which have // been completed. CompletedRequests(ctx context.Context, in *CompletedRequestsRequest, opts ...grpc.CallOption) (*CompletedRequestsResponse, error) // CreateHunt initiates a hunt which sends the provided TrafficRequestData to // every client, up to limit. CreateHunt(ctx context.Context, in *CreateHuntRequest, opts ...grpc.CallOption) (*CreateHuntResponse, error) }
MasterClient is the client API for Master service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
The service implemented by the FRR master server to collect data from the FRR Fleetspeak server services.
func NewMasterClient ¶
func NewMasterClient(cc grpc.ClientConnInterface) MasterClient
type MasterServer ¶
type MasterServer interface { // RecordMessage records that a TrafficResponse message was received by // the FS server. RecordTrafficResponse(context.Context, *MessageInfo) (*fleetspeak.EmptyMessage, error) // RecordFileResponse records that a FileResponse message was received // by the FS server. RecordFileResponse(context.Context, *FileResponseInfo) (*fleetspeak.EmptyMessage, error) // CompletedRequests returns a list of requests made to a client which have // been completed. CompletedRequests(context.Context, *CompletedRequestsRequest) (*CompletedRequestsResponse, error) // CreateHunt initiates a hunt which sends the provided TrafficRequestData to // every client, up to limit. CreateHunt(context.Context, *CreateHuntRequest) (*CreateHuntResponse, error) // contains filtered or unexported methods }
MasterServer is the server API for Master service. All implementations must embed UnimplementedMasterServer for forward compatibility
The service implemented by the FRR master server to collect data from the FRR Fleetspeak server services.
type MessageInfo ¶
type MessageInfo struct { ClientId []byte `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Data *TrafficResponseData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*MessageInfo) Descriptor
deprecated
func (*MessageInfo) Descriptor() ([]byte, []int)
Deprecated: Use MessageInfo.ProtoReflect.Descriptor instead.
func (*MessageInfo) GetClientId ¶
func (x *MessageInfo) GetClientId() []byte
func (*MessageInfo) GetData ¶
func (x *MessageInfo) GetData() *TrafficResponseData
func (*MessageInfo) ProtoMessage ¶
func (*MessageInfo) ProtoMessage()
func (*MessageInfo) ProtoReflect ¶
func (x *MessageInfo) ProtoReflect() protoreflect.Message
func (*MessageInfo) Reset ¶
func (x *MessageInfo) Reset()
func (*MessageInfo) String ¶
func (x *MessageInfo) String() string
type TrafficRequestData ¶
type TrafficRequestData struct { // An identifier used to identify the frr master instance responsible for // this. MasterId int64 `protobuf:"varint,1,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` // An identifier used to link responses to requests. RequestId int64 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // How many messages to send back for this request. Defaults to 1. NumMessages int64 `protobuf:"varint,3,opt,name=num_messages,json=numMessages,proto3" json:"num_messages,omitempty"` // How large should each message be, in bytes. Defaults to 1024. MessageSize int64 `protobuf:"varint,4,opt,name=message_size,json=messageSize,proto3" json:"message_size,omitempty"` // How long to wait between messages. Defaults to 0. MessageDelayMs int64 `protobuf:"varint,5,opt,name=message_delay_ms,json=messageDelayMs,proto3" json:"message_delay_ms,omitempty"` // How much to jitter the previous parameters - all parameters will be // multiplied by a number between 1.0 and 1.0 + jitter. Jitter float32 `protobuf:"fixed32,6,opt,name=jitter,proto3" json:"jitter,omitempty"` // contains filtered or unexported fields }
A TrafficRequest message is sent from the server to the client which tells the client to send random data back.
func (*TrafficRequestData) Descriptor
deprecated
func (*TrafficRequestData) Descriptor() ([]byte, []int)
Deprecated: Use TrafficRequestData.ProtoReflect.Descriptor instead.
func (*TrafficRequestData) GetJitter ¶
func (x *TrafficRequestData) GetJitter() float32
func (*TrafficRequestData) GetMasterId ¶
func (x *TrafficRequestData) GetMasterId() int64
func (*TrafficRequestData) GetMessageDelayMs ¶
func (x *TrafficRequestData) GetMessageDelayMs() int64
func (*TrafficRequestData) GetMessageSize ¶
func (x *TrafficRequestData) GetMessageSize() int64
func (*TrafficRequestData) GetNumMessages ¶
func (x *TrafficRequestData) GetNumMessages() int64
func (*TrafficRequestData) GetRequestId ¶
func (x *TrafficRequestData) GetRequestId() int64
func (*TrafficRequestData) ProtoMessage ¶
func (*TrafficRequestData) ProtoMessage()
func (*TrafficRequestData) ProtoReflect ¶
func (x *TrafficRequestData) ProtoReflect() protoreflect.Message
func (*TrafficRequestData) Reset ¶
func (x *TrafficRequestData) Reset()
func (*TrafficRequestData) String ¶
func (x *TrafficRequestData) String() string
type TrafficResponseData ¶
type TrafficResponseData struct { MasterId int64 `protobuf:"varint,1,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` RequestId int64 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` ResponseIndex int64 `protobuf:"varint,3,opt,name=response_index,json=responseIndex,proto3" json:"response_index,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // Set when this is the last message responsive to the given request. Fin bool `protobuf:"varint,5,opt,name=fin,proto3" json:"fin,omitempty"` // contains filtered or unexported fields }
func (*TrafficResponseData) Descriptor
deprecated
func (*TrafficResponseData) Descriptor() ([]byte, []int)
Deprecated: Use TrafficResponseData.ProtoReflect.Descriptor instead.
func (*TrafficResponseData) GetData ¶
func (x *TrafficResponseData) GetData() []byte
func (*TrafficResponseData) GetFin ¶
func (x *TrafficResponseData) GetFin() bool
func (*TrafficResponseData) GetMasterId ¶
func (x *TrafficResponseData) GetMasterId() int64
func (*TrafficResponseData) GetRequestId ¶
func (x *TrafficResponseData) GetRequestId() int64
func (*TrafficResponseData) GetResponseIndex ¶
func (x *TrafficResponseData) GetResponseIndex() int64
func (*TrafficResponseData) ProtoMessage ¶
func (*TrafficResponseData) ProtoMessage()
func (*TrafficResponseData) ProtoReflect ¶
func (x *TrafficResponseData) ProtoReflect() protoreflect.Message
func (*TrafficResponseData) Reset ¶
func (x *TrafficResponseData) Reset()
func (*TrafficResponseData) String ¶
func (x *TrafficResponseData) String() string
type UnimplementedMasterServer ¶
type UnimplementedMasterServer struct { }
UnimplementedMasterServer must be embedded to have forward compatible implementations.
func (UnimplementedMasterServer) CompletedRequests ¶
func (UnimplementedMasterServer) CompletedRequests(context.Context, *CompletedRequestsRequest) (*CompletedRequestsResponse, error)
func (UnimplementedMasterServer) CreateHunt ¶
func (UnimplementedMasterServer) CreateHunt(context.Context, *CreateHuntRequest) (*CreateHuntResponse, error)
func (UnimplementedMasterServer) RecordFileResponse ¶
func (UnimplementedMasterServer) RecordFileResponse(context.Context, *FileResponseInfo) (*fleetspeak.EmptyMessage, error)
func (UnimplementedMasterServer) RecordTrafficResponse ¶
func (UnimplementedMasterServer) RecordTrafficResponse(context.Context, *MessageInfo) (*fleetspeak.EmptyMessage, error)
type UnsafeMasterServer ¶
type UnsafeMasterServer interface {
// contains filtered or unexported methods
}
UnsafeMasterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MasterServer will result in compilation errors.