api

package
v0.0.0-...-e3d77be Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_api_proto protoreflect.FileDescriptor
View Source
var TrayceAgent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.TrayceAgent",
	HandlerType: (*TrayceAgentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendFlowsObserved",
			Handler:    _TrayceAgent_SendFlowsObserved_Handler,
		},
		{
			MethodName: "SendContainersObserved",
			Handler:    _TrayceAgent_SendContainersObserved_Handler,
		},
		{
			MethodName: "SendAgentStarted",
			Handler:    _TrayceAgent_SendAgentStarted_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "OpenCommandStream",
			Handler:       _TrayceAgent_OpenCommandStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api/api.proto",
}

TrayceAgent_ServiceDesc is the grpc.ServiceDesc for TrayceAgent service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTrayceAgentServer

func RegisterTrayceAgentServer(s grpc.ServiceRegistrar, srv TrayceAgentServer)

Types

type AgentStarted

type AgentStarted struct {
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentStarted) Descriptor deprecated

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

Deprecated: Use AgentStarted.ProtoReflect.Descriptor instead.

func (*AgentStarted) GetVersion

func (x *AgentStarted) GetVersion() string

func (*AgentStarted) ProtoMessage

func (*AgentStarted) ProtoMessage()

func (*AgentStarted) ProtoReflect

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

func (*AgentStarted) Reset

func (x *AgentStarted) Reset()

func (*AgentStarted) String

func (x *AgentStarted) String() string

type Command

type Command struct {
	Type     string    `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Settings *Settings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetSettings

func (x *Command) GetSettings() *Settings

func (*Command) GetType

func (x *Command) GetType() string

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 Container

type Container struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Image  string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	Ip     string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Name   string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Container) Descriptor deprecated

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

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetId

func (x *Container) GetId() string

func (*Container) GetImage

func (x *Container) GetImage() string

func (*Container) GetIp

func (x *Container) GetIp() string

func (*Container) GetName

func (x *Container) GetName() string

func (*Container) GetStatus

func (x *Container) GetStatus() string

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) ProtoReflect

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

func (*Container) Reset

func (x *Container) Reset()

func (*Container) String

func (x *Container) String() string

type Containers

type Containers struct {
	Containers []*Container `protobuf:"bytes,1,rep,name=containers,proto3" json:"containers,omitempty"`
	// contains filtered or unexported fields
}

func (*Containers) Descriptor deprecated

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

Deprecated: Use Containers.ProtoReflect.Descriptor instead.

func (*Containers) GetContainers

func (x *Containers) GetContainers() []*Container

func (*Containers) ProtoMessage

func (*Containers) ProtoMessage()

func (*Containers) ProtoReflect

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

func (*Containers) Reset

func (x *Containers) Reset()

func (*Containers) String

func (x *Containers) String() string

type Flow

type Flow struct {
	Uuid       string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	SourceAddr string `protobuf:"bytes,2,opt,name=source_addr,json=sourceAddr,proto3" json:"source_addr,omitempty"`
	DestAddr   string `protobuf:"bytes,3,opt,name=dest_addr,json=destAddr,proto3" json:"dest_addr,omitempty"`
	L4Protocol string `protobuf:"bytes,4,opt,name=l4_protocol,json=l4Protocol,proto3" json:"l4_protocol,omitempty"`
	L7Protocol string `protobuf:"bytes,5,opt,name=l7_protocol,json=l7Protocol,proto3" json:"l7_protocol,omitempty"`
	Request    []byte `protobuf:"bytes,6,opt,name=request,proto3" json:"request,omitempty"`
	Response   []byte `protobuf:"bytes,7,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*Flow) Descriptor deprecated

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

Deprecated: Use Flow.ProtoReflect.Descriptor instead.

func (*Flow) GetDestAddr

func (x *Flow) GetDestAddr() string

func (*Flow) GetL4Protocol

func (x *Flow) GetL4Protocol() string

func (*Flow) GetL7Protocol

func (x *Flow) GetL7Protocol() string

func (*Flow) GetRequest

func (x *Flow) GetRequest() []byte

func (*Flow) GetResponse

func (x *Flow) GetResponse() []byte

func (*Flow) GetSourceAddr

func (x *Flow) GetSourceAddr() string

func (*Flow) GetUuid

func (x *Flow) GetUuid() string

func (*Flow) ProtoMessage

func (*Flow) ProtoMessage()

func (*Flow) ProtoReflect

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

func (*Flow) Reset

func (x *Flow) Reset()

func (*Flow) String

func (x *Flow) String() string

type FlowQueue

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

func NewFlowQueue

func NewFlowQueue(grpcClient TrayceAgentClient, batchSize int) *FlowQueue

func (*FlowQueue) Start

func (fq *FlowQueue) Start(ctx context.Context, inputChan chan sockets.Flow)

type Flows

type Flows struct {
	Flows []*Flow `protobuf:"bytes,1,rep,name=flows,proto3" json:"flows,omitempty"`
	// contains filtered or unexported fields
}

func (*Flows) Descriptor deprecated

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

Deprecated: Use Flows.ProtoReflect.Descriptor instead.

func (*Flows) GetFlows

func (x *Flows) GetFlows() []*Flow

func (*Flows) ProtoMessage

func (*Flows) ProtoMessage()

func (*Flows) ProtoReflect

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

func (*Flows) Reset

func (x *Flows) Reset()

func (*Flows) String

func (x *Flows) String() string

type Reply

type Reply struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Reply) Descriptor deprecated

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

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetStatus

func (x *Reply) GetStatus() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

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

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type Request

type Request struct {
	Num int32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetNum

func (x *Request) GetNum() int32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetResult

func (x *Response) GetResult() int32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Settings

type Settings struct {
	ContainerIds []string `protobuf:"bytes,1,rep,name=container_ids,json=containerIds,proto3" json:"container_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*Settings) Descriptor deprecated

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

Deprecated: Use Settings.ProtoReflect.Descriptor instead.

func (*Settings) GetContainerIds

func (x *Settings) GetContainerIds() []string

func (*Settings) ProtoMessage

func (*Settings) ProtoMessage()

func (*Settings) ProtoReflect

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

func (*Settings) Reset

func (x *Settings) Reset()

func (*Settings) String

func (x *Settings) String() string

type TrayceAgentClient

type TrayceAgentClient interface {
	SendFlowsObserved(ctx context.Context, in *Flows, opts ...grpc.CallOption) (*Reply, error)
	SendContainersObserved(ctx context.Context, in *Containers, opts ...grpc.CallOption) (*Reply, error)
	SendAgentStarted(ctx context.Context, in *AgentStarted, opts ...grpc.CallOption) (*Reply, error)
	OpenCommandStream(ctx context.Context, opts ...grpc.CallOption) (TrayceAgent_OpenCommandStreamClient, error)
}

TrayceAgentClient is the client API for TrayceAgent 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 TrayceAgentServer

type TrayceAgentServer interface {
	SendFlowsObserved(context.Context, *Flows) (*Reply, error)
	SendContainersObserved(context.Context, *Containers) (*Reply, error)
	SendAgentStarted(context.Context, *AgentStarted) (*Reply, error)
	OpenCommandStream(TrayceAgent_OpenCommandStreamServer) error
	// contains filtered or unexported methods
}

TrayceAgentServer is the server API for TrayceAgent service. All implementations must embed UnimplementedTrayceAgentServer for forward compatibility

type TrayceAgent_OpenCommandStreamClient

type TrayceAgent_OpenCommandStreamClient interface {
	Send(*AgentStarted) error
	Recv() (*Command, error)
	grpc.ClientStream
}

type TrayceAgent_OpenCommandStreamServer

type TrayceAgent_OpenCommandStreamServer interface {
	Send(*Command) error
	Recv() (*AgentStarted, error)
	grpc.ServerStream
}

type UnimplementedTrayceAgentServer

type UnimplementedTrayceAgentServer struct {
}

UnimplementedTrayceAgentServer must be embedded to have forward compatible implementations.

func (UnimplementedTrayceAgentServer) OpenCommandStream

func (UnimplementedTrayceAgentServer) SendAgentStarted

func (UnimplementedTrayceAgentServer) SendContainersObserved

func (UnimplementedTrayceAgentServer) SendContainersObserved(context.Context, *Containers) (*Reply, error)

func (UnimplementedTrayceAgentServer) SendFlowsObserved

type UnsafeTrayceAgentServer

type UnsafeTrayceAgentServer interface {
	// contains filtered or unexported methods
}

UnsafeTrayceAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrayceAgentServer will result in compilation errors.

Jump to

Keyboard shortcuts

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