Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDecoyAlgorithmServer(s grpc.ServiceRegistrar, srv DecoyAlgorithmServer)
- type Algorithm
- type Application
- func (*Application) Descriptor() ([]byte, []int)deprecated
- func (x *Application) GetDataFlows() []*DataFlow
- func (x *Application) GetMicroservices() []*Microservice
- func (x *Application) GetName() string
- func (*Application) ProtoMessage()
- func (x *Application) ProtoReflect() protoreflect.Message
- func (x *Application) Reset()
- func (x *Application) String() string
- type ApplicationDecoy
- func (*ApplicationDecoy) Descriptor() ([]byte, []int)deprecated
- func (x *ApplicationDecoy) GetClones() []*Clone
- func (x *ApplicationDecoy) GetName() string
- func (*ApplicationDecoy) ProtoMessage()
- func (x *ApplicationDecoy) ProtoReflect() protoreflect.Message
- func (x *ApplicationDecoy) Reset()
- func (x *ApplicationDecoy) String() string
- type Clone
- type DataFlow
- func (*DataFlow) Descriptor() ([]byte, []int)deprecated
- func (x *DataFlow) GetDstId() string
- func (x *DataFlow) GetName() string
- func (x *DataFlow) GetSrcId() string
- func (*DataFlow) ProtoMessage()
- func (x *DataFlow) ProtoReflect() protoreflect.Message
- func (x *DataFlow) Reset()
- func (x *DataFlow) String() string
- type DecoyAlgorithmClient
- type DecoyAlgorithmServer
- type Infrastructure
- type Input
- type Microservice
- func (*Microservice) Descriptor() ([]byte, []int)deprecated
- func (x *Microservice) GetCpuRequired() *ResourceQuantity
- func (x *Microservice) GetIsDecoy() bool
- func (x *Microservice) GetMemRequired() *ResourceQuantity
- func (x *Microservice) GetName() string
- func (x *Microservice) GetReplicas() int32
- func (x *Microservice) GetSecurityScore() float32
- func (*Microservice) ProtoMessage()
- func (x *Microservice) ProtoReflect() protoreflect.Message
- func (x *Microservice) Reset()
- func (x *Microservice) String() string
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetCpuTot() *ResourceQuantity
- func (x *Node) GetCpuUsed() *ResourceQuantity
- func (x *Node) GetMemTot() *ResourceQuantity
- func (x *Node) GetMemUsed() *ResourceQuantity
- func (x *Node) GetName() string
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- type Output
- type ResourceQuantity
- func (*ResourceQuantity) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceQuantity) GetFormat() string
- func (x *ResourceQuantity) GetValue() string
- func (*ResourceQuantity) ProtoMessage()
- func (x *ResourceQuantity) ProtoReflect() protoreflect.Message
- func (x *ResourceQuantity) Reset()
- func (x *ResourceQuantity) String() string
- type UnimplementedDecoyAlgorithmServer
- type UnsafeDecoyAlgorithmServer
- type Workload
Constants ¶
const ( DecoyAlgorithm_Init_FullMethodName = "/idl.DecoyAlgorithm/Init" DecoyAlgorithm_CalculateDecoys_FullMethodName = "/idl.DecoyAlgorithm/CalculateDecoys" )
Variables ¶
var DecoyAlgorithm_ServiceDesc = grpc.ServiceDesc{ ServiceName: "idl.DecoyAlgorithm", HandlerType: (*DecoyAlgorithmServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Init", Handler: _DecoyAlgorithm_Init_Handler, }, { MethodName: "CalculateDecoys", Handler: _DecoyAlgorithm_CalculateDecoys_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/idl.proto", }
DecoyAlgorithm_ServiceDesc is the grpc.ServiceDesc for DecoyAlgorithm service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_idl_idl_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDecoyAlgorithmServer ¶
func RegisterDecoyAlgorithmServer(s grpc.ServiceRegistrar, srv DecoyAlgorithmServer)
Types ¶
type Algorithm ¶
type Algorithm struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` ResourceCap float32 `protobuf:"fixed32,2,opt,name=resource_cap,json=resourceCap,proto3" json:"resource_cap,omitempty"` // contains filtered or unexported fields }
The algorithm and its configuration parameters
func (*Algorithm) Descriptor
deprecated
func (*Algorithm) GetResourceCap ¶
func (*Algorithm) ProtoMessage ¶
func (*Algorithm) ProtoMessage()
func (*Algorithm) ProtoReflect ¶
func (x *Algorithm) ProtoReflect() protoreflect.Message
type Application ¶
type Application struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Microservices []*Microservice `protobuf:"bytes,2,rep,name=microservices,proto3" json:"microservices,omitempty"` // If at least one dataflow of app1 connects to a microservice of app2, // then app1 and app2 are the same app DataFlows []*DataFlow `protobuf:"bytes,3,rep,name=data_flows,json=dataFlows,proto3" json:"data_flows,omitempty"` // contains filtered or unexported fields }
func (*Application) Descriptor
deprecated
func (*Application) Descriptor() ([]byte, []int)
Deprecated: Use Application.ProtoReflect.Descriptor instead.
func (*Application) GetDataFlows ¶
func (x *Application) GetDataFlows() []*DataFlow
func (*Application) GetMicroservices ¶
func (x *Application) GetMicroservices() []*Microservice
func (*Application) GetName ¶
func (x *Application) GetName() string
func (*Application) ProtoMessage ¶
func (*Application) ProtoMessage()
func (*Application) ProtoReflect ¶
func (x *Application) ProtoReflect() protoreflect.Message
func (*Application) Reset ¶
func (x *Application) Reset()
func (*Application) String ¶
func (x *Application) String() string
type ApplicationDecoy ¶
type ApplicationDecoy struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // One clone object for each microservice to be cloned as decoy Clones []*Clone `protobuf:"bytes,2,rep,name=clones,proto3" json:"clones,omitempty"` // contains filtered or unexported fields }
func (*ApplicationDecoy) Descriptor
deprecated
func (*ApplicationDecoy) Descriptor() ([]byte, []int)
Deprecated: Use ApplicationDecoy.ProtoReflect.Descriptor instead.
func (*ApplicationDecoy) GetClones ¶
func (x *ApplicationDecoy) GetClones() []*Clone
func (*ApplicationDecoy) GetName ¶
func (x *ApplicationDecoy) GetName() string
func (*ApplicationDecoy) ProtoMessage ¶
func (*ApplicationDecoy) ProtoMessage()
func (*ApplicationDecoy) ProtoReflect ¶
func (x *ApplicationDecoy) ProtoReflect() protoreflect.Message
func (*ApplicationDecoy) Reset ¶
func (x *ApplicationDecoy) Reset()
func (*ApplicationDecoy) String ¶
func (x *ApplicationDecoy) String() string
type Clone ¶
type Clone struct { MicroserviceName string `protobuf:"bytes,1,opt,name=microservice_name,json=microserviceName,proto3" json:"microservice_name,omitempty"` // Rank is expressed via priority queue: from 1 to N Rank int32 `protobuf:"varint,2,opt,name=rank,proto3" json:"rank,omitempty"` // contains filtered or unexported fields }
func (*Clone) Descriptor
deprecated
func (*Clone) GetMicroserviceName ¶
func (*Clone) ProtoMessage ¶
func (*Clone) ProtoMessage()
func (*Clone) ProtoReflect ¶
func (x *Clone) ProtoReflect() protoreflect.Message
type DataFlow ¶
type DataFlow struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` SrcId string `protobuf:"bytes,2,opt,name=src_id,json=srcId,proto3" json:"src_id,omitempty"` DstId string `protobuf:"bytes,3,opt,name=dst_id,json=dstId,proto3" json:"dst_id,omitempty"` // contains filtered or unexported fields }
func (*DataFlow) Descriptor
deprecated
func (*DataFlow) ProtoMessage ¶
func (*DataFlow) ProtoMessage()
func (*DataFlow) ProtoReflect ¶
func (x *DataFlow) ProtoReflect() protoreflect.Message
type DecoyAlgorithmClient ¶
type DecoyAlgorithmClient interface { Init(ctx context.Context, in *Algorithm, opts ...grpc.CallOption) (*emptypb.Empty, error) CalculateDecoys(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error) }
DecoyAlgorithmClient is the client API for DecoyAlgorithm 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.
func NewDecoyAlgorithmClient ¶
func NewDecoyAlgorithmClient(cc grpc.ClientConnInterface) DecoyAlgorithmClient
type DecoyAlgorithmServer ¶
type DecoyAlgorithmServer interface { Init(context.Context, *Algorithm) (*emptypb.Empty, error) CalculateDecoys(context.Context, *Input) (*Output, error) // contains filtered or unexported methods }
DecoyAlgorithmServer is the server API for DecoyAlgorithm service. All implementations must embed UnimplementedDecoyAlgorithmServer for forward compatibility
type Infrastructure ¶
type Infrastructure struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*Infrastructure) Descriptor
deprecated
func (*Infrastructure) Descriptor() ([]byte, []int)
Deprecated: Use Infrastructure.ProtoReflect.Descriptor instead.
func (*Infrastructure) GetNodes ¶
func (x *Infrastructure) GetNodes() []*Node
func (*Infrastructure) ProtoMessage ¶
func (*Infrastructure) ProtoMessage()
func (*Infrastructure) ProtoReflect ¶
func (x *Infrastructure) ProtoReflect() protoreflect.Message
func (*Infrastructure) Reset ¶
func (x *Infrastructure) Reset()
func (*Infrastructure) String ¶
func (x *Infrastructure) String() string
type Input ¶
type Input struct { Workload *Workload `protobuf:"bytes,1,opt,name=workload,proto3" json:"workload,omitempty"` Infrastructure *Infrastructure `protobuf:"bytes,2,opt,name=infrastructure,proto3" json:"infrastructure,omitempty"` // contains filtered or unexported fields }
The input message
func (*Input) Descriptor
deprecated
func (*Input) GetInfrastructure ¶
func (x *Input) GetInfrastructure() *Infrastructure
func (*Input) GetWorkload ¶
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
func (*Input) ProtoReflect ¶
func (x *Input) ProtoReflect() protoreflect.Message
type Microservice ¶
type Microservice struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` IsDecoy bool `protobuf:"varint,2,opt,name=is_decoy,json=isDecoy,proto3" json:"is_decoy,omitempty"` SecurityScore float32 `protobuf:"fixed32,3,opt,name=security_score,json=securityScore,proto3" json:"security_score,omitempty"` CpuRequired *ResourceQuantity `protobuf:"bytes,4,opt,name=cpu_required,json=cpuRequired,proto3" json:"cpu_required,omitempty"` MemRequired *ResourceQuantity `protobuf:"bytes,5,opt,name=mem_required,json=memRequired,proto3" json:"mem_required,omitempty"` Replicas int32 `protobuf:"varint,6,opt,name=replicas,proto3" json:"replicas,omitempty"` // contains filtered or unexported fields }
func (*Microservice) Descriptor
deprecated
func (*Microservice) Descriptor() ([]byte, []int)
Deprecated: Use Microservice.ProtoReflect.Descriptor instead.
func (*Microservice) GetCpuRequired ¶
func (x *Microservice) GetCpuRequired() *ResourceQuantity
func (*Microservice) GetIsDecoy ¶
func (x *Microservice) GetIsDecoy() bool
func (*Microservice) GetMemRequired ¶
func (x *Microservice) GetMemRequired() *ResourceQuantity
func (*Microservice) GetName ¶
func (x *Microservice) GetName() string
func (*Microservice) GetReplicas ¶
func (x *Microservice) GetReplicas() int32
func (*Microservice) GetSecurityScore ¶
func (x *Microservice) GetSecurityScore() float32
func (*Microservice) ProtoMessage ¶
func (*Microservice) ProtoMessage()
func (*Microservice) ProtoReflect ¶
func (x *Microservice) ProtoReflect() protoreflect.Message
func (*Microservice) Reset ¶
func (x *Microservice) Reset()
func (*Microservice) String ¶
func (x *Microservice) String() string
type Node ¶
type Node struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` CpuUsed *ResourceQuantity `protobuf:"bytes,2,opt,name=cpu_used,json=cpuUsed,proto3" json:"cpu_used,omitempty"` MemUsed *ResourceQuantity `protobuf:"bytes,3,opt,name=mem_used,json=memUsed,proto3" json:"mem_used,omitempty"` CpuTot *ResourceQuantity `protobuf:"bytes,4,opt,name=cpu_tot,json=cpuTot,proto3" json:"cpu_tot,omitempty"` MemTot *ResourceQuantity `protobuf:"bytes,5,opt,name=mem_tot,json=memTot,proto3" json:"mem_tot,omitempty"` // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) GetCpuTot ¶
func (x *Node) GetCpuTot() *ResourceQuantity
func (*Node) GetCpuUsed ¶
func (x *Node) GetCpuUsed() *ResourceQuantity
func (*Node) GetMemTot ¶
func (x *Node) GetMemTot() *ResourceQuantity
func (*Node) GetMemUsed ¶
func (x *Node) GetMemUsed() *ResourceQuantity
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type Output ¶
type Output struct { AppDecoys []*ApplicationDecoy `protobuf:"bytes,1,rep,name=app_decoys,json=appDecoys,proto3" json:"app_decoys,omitempty"` // contains filtered or unexported fields }
The output message
func (*Output) Descriptor
deprecated
func (*Output) GetAppDecoys ¶
func (x *Output) GetAppDecoys() []*ApplicationDecoy
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type ResourceQuantity ¶
type ResourceQuantity struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` // contains filtered or unexported fields }
func (*ResourceQuantity) Descriptor
deprecated
func (*ResourceQuantity) Descriptor() ([]byte, []int)
Deprecated: Use ResourceQuantity.ProtoReflect.Descriptor instead.
func (*ResourceQuantity) GetFormat ¶
func (x *ResourceQuantity) GetFormat() string
func (*ResourceQuantity) GetValue ¶
func (x *ResourceQuantity) GetValue() string
func (*ResourceQuantity) ProtoMessage ¶
func (*ResourceQuantity) ProtoMessage()
func (*ResourceQuantity) ProtoReflect ¶
func (x *ResourceQuantity) ProtoReflect() protoreflect.Message
func (*ResourceQuantity) Reset ¶
func (x *ResourceQuantity) Reset()
func (*ResourceQuantity) String ¶
func (x *ResourceQuantity) String() string
type UnimplementedDecoyAlgorithmServer ¶
type UnimplementedDecoyAlgorithmServer struct { }
UnimplementedDecoyAlgorithmServer must be embedded to have forward compatible implementations.
func (UnimplementedDecoyAlgorithmServer) CalculateDecoys ¶
type UnsafeDecoyAlgorithmServer ¶
type UnsafeDecoyAlgorithmServer interface {
// contains filtered or unexported methods
}
UnsafeDecoyAlgorithmServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DecoyAlgorithmServer will result in compilation errors.
type Workload ¶
type Workload struct { Applications []*Application `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications,omitempty"` // contains filtered or unexported fields }
func (*Workload) Descriptor
deprecated
func (*Workload) GetApplications ¶
func (x *Workload) GetApplications() []*Application
func (*Workload) ProtoMessage ¶
func (*Workload) ProtoMessage()
func (*Workload) ProtoReflect ¶
func (x *Workload) ProtoReflect() protoreflect.Message