idl

package
v0.0.0-...-6ae116f Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DecoyAlgorithm_Init_FullMethodName            = "/idl.DecoyAlgorithm/Init"
	DecoyAlgorithm_CalculateDecoys_FullMethodName = "/idl.DecoyAlgorithm/CalculateDecoys"
)

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Algorithm.ProtoReflect.Descriptor instead.

func (*Algorithm) GetName

func (x *Algorithm) GetName() string

func (*Algorithm) GetResourceCap

func (x *Algorithm) GetResourceCap() float32

func (*Algorithm) ProtoMessage

func (*Algorithm) ProtoMessage()

func (*Algorithm) ProtoReflect

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

func (*Algorithm) Reset

func (x *Algorithm) Reset()

func (*Algorithm) String

func (x *Algorithm) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Clone.ProtoReflect.Descriptor instead.

func (*Clone) GetMicroserviceName

func (x *Clone) GetMicroserviceName() string

func (*Clone) GetRank

func (x *Clone) GetRank() int32

func (*Clone) ProtoMessage

func (*Clone) ProtoMessage()

func (*Clone) ProtoReflect

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

func (*Clone) Reset

func (x *Clone) Reset()

func (*Clone) String

func (x *Clone) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use DataFlow.ProtoReflect.Descriptor instead.

func (*DataFlow) GetDstId

func (x *DataFlow) GetDstId() string

func (*DataFlow) GetName

func (x *DataFlow) GetName() string

func (*DataFlow) GetSrcId

func (x *DataFlow) GetSrcId() string

func (*DataFlow) ProtoMessage

func (*DataFlow) ProtoMessage()

func (*DataFlow) ProtoReflect

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

func (*DataFlow) Reset

func (x *DataFlow) Reset()

func (*DataFlow) String

func (x *DataFlow) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetInfrastructure

func (x *Input) GetInfrastructure() *Infrastructure

func (*Input) GetWorkload

func (x *Input) GetWorkload() *Workload

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

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

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

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) GetName

func (x *Node) GetName() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetAppDecoys

func (x *Output) GetAppDecoys() []*ApplicationDecoy

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

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

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

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

func (UnimplementedDecoyAlgorithmServer) Init

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) Descriptor() ([]byte, []int)

Deprecated: Use Workload.ProtoReflect.Descriptor instead.

func (*Workload) GetApplications

func (x *Workload) GetApplications() []*Application

func (*Workload) ProtoMessage

func (*Workload) ProtoMessage()

func (*Workload) ProtoReflect

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

func (*Workload) Reset

func (x *Workload) Reset()

func (*Workload) String

func (x *Workload) String() string

Jump to

Keyboard shortcuts

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