rpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PacketType_name = map[int32]string{
		0: "all",
		1: "flow",
		2: "drop",
	}
	PacketType_value = map[string]int32{
		"all":  0,
		"flow": 1,
		"drop": 2,
	}
)

Enum value maps for PacketType.

View Source
var (
	HCNType_name = map[int32]string{
		0: "all",
		1: "endpoints",
		2: "loadbalancers",
		3: "namespaces",
		4: "networks",
	}
	HCNType_value = map[string]int32{
		"all":           0,
		"endpoints":     1,
		"loadbalancers": 2,
		"namespaces":    3,
		"networks":      4,
	}
)

Enum value maps for HCNType.

View Source
var CaptureService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wcnspect.captures.CaptureService",
	HandlerType: (*CaptureServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StopCapture",
			Handler:    _CaptureService_StopCapture_Handler,
		},
		{
			MethodName: "GetCounters",
			Handler:    _CaptureService_GetCounters_Handler,
		},
		{
			MethodName: "GetVFPCounters",
			Handler:    _CaptureService_GetVFPCounters_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StartCapture",
			Handler:       _CaptureService_StartCapture_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "captures.proto",
}

CaptureService_ServiceDesc is the grpc.ServiceDesc for CaptureService 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_captures_proto protoreflect.FileDescriptor
View Source
var HCNService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wcnspect.hcn.HCNService",
	HandlerType: (*HCNServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetHCNLogs",
			Handler:    _HCNService_GetHCNLogs_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hcn.proto",
}

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

Functions

func RegisterCaptureServiceServer

func RegisterCaptureServiceServer(s grpc.ServiceRegistrar, srv CaptureServiceServer)

func RegisterHCNServiceServer

func RegisterHCNServiceServer(s grpc.ServiceRegistrar, srv HCNServiceServer)

Types

type CaptureRequest

type CaptureRequest struct {
	Duration  int32                  `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Modifier  *Modifiers             `protobuf:"bytes,3,opt,name=modifier,proto3" json:"modifier,omitempty"`
	Filter    *Filters               `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

requests

func (*CaptureRequest) Descriptor deprecated

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

Deprecated: Use CaptureRequest.ProtoReflect.Descriptor instead.

func (*CaptureRequest) GetDuration

func (x *CaptureRequest) GetDuration() int32

func (*CaptureRequest) GetFilter

func (x *CaptureRequest) GetFilter() *Filters

func (*CaptureRequest) GetModifier

func (x *CaptureRequest) GetModifier() *Modifiers

func (*CaptureRequest) GetTimestamp

func (x *CaptureRequest) GetTimestamp() *timestamppb.Timestamp

func (*CaptureRequest) ProtoMessage

func (*CaptureRequest) ProtoMessage()

func (*CaptureRequest) ProtoReflect

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

func (*CaptureRequest) Reset

func (x *CaptureRequest) Reset()

func (*CaptureRequest) String

func (x *CaptureRequest) String() string

type CaptureResponse

type CaptureResponse struct {
	Result    string                 `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

responses

func (*CaptureResponse) Descriptor deprecated

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

Deprecated: Use CaptureResponse.ProtoReflect.Descriptor instead.

func (*CaptureResponse) GetResult

func (x *CaptureResponse) GetResult() string

func (*CaptureResponse) GetTimestamp

func (x *CaptureResponse) GetTimestamp() *timestamppb.Timestamp

func (*CaptureResponse) ProtoMessage

func (*CaptureResponse) ProtoMessage()

func (*CaptureResponse) ProtoReflect

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

func (*CaptureResponse) Reset

func (x *CaptureResponse) Reset()

func (*CaptureResponse) String

func (x *CaptureResponse) String() string

type CaptureServiceClient

type CaptureServiceClient interface {
	StartCapture(ctx context.Context, in *CaptureRequest, opts ...grpc.CallOption) (CaptureService_StartCaptureClient, error)
	StopCapture(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StopCaptureResponse, error)
	GetCounters(ctx context.Context, in *CountersRequest, opts ...grpc.CallOption) (*CountersResponse, error)
	GetVFPCounters(ctx context.Context, in *VFPCountersRequest, opts ...grpc.CallOption) (*VFPCountersResponse, error)
}

CaptureServiceClient is the client API for CaptureService 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 CaptureServiceServer

type CaptureServiceServer interface {
	StartCapture(*CaptureRequest, CaptureService_StartCaptureServer) error
	StopCapture(context.Context, *Empty) (*StopCaptureResponse, error)
	GetCounters(context.Context, *CountersRequest) (*CountersResponse, error)
	GetVFPCounters(context.Context, *VFPCountersRequest) (*VFPCountersResponse, error)
	// contains filtered or unexported methods
}

CaptureServiceServer is the server API for CaptureService service. All implementations must embed UnimplementedCaptureServiceServer for forward compatibility

type CaptureService_StartCaptureClient

type CaptureService_StartCaptureClient interface {
	Recv() (*CaptureResponse, error)
	grpc.ClientStream
}

type CaptureService_StartCaptureServer

type CaptureService_StartCaptureServer interface {
	Send(*CaptureResponse) error
	grpc.ServerStream
}

type CountersRequest

type CountersRequest struct {
	IncludeHidden bool `protobuf:"varint,1,opt,name=include_hidden,json=includeHidden,proto3" json:"include_hidden,omitempty"`
	// contains filtered or unexported fields
}

func (*CountersRequest) Descriptor deprecated

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

Deprecated: Use CountersRequest.ProtoReflect.Descriptor instead.

func (*CountersRequest) GetIncludeHidden

func (x *CountersRequest) GetIncludeHidden() bool

func (*CountersRequest) ProtoMessage

func (*CountersRequest) ProtoMessage()

func (*CountersRequest) ProtoReflect

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

func (*CountersRequest) Reset

func (x *CountersRequest) Reset()

func (*CountersRequest) String

func (x *CountersRequest) String() string

type CountersResponse

type CountersResponse struct {
	Result    string                 `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*CountersResponse) Descriptor deprecated

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

Deprecated: Use CountersResponse.ProtoReflect.Descriptor instead.

func (*CountersResponse) GetResult

func (x *CountersResponse) GetResult() string

func (*CountersResponse) GetTimestamp

func (x *CountersResponse) GetTimestamp() *timestamppb.Timestamp

func (*CountersResponse) ProtoMessage

func (*CountersResponse) ProtoMessage()

func (*CountersResponse) ProtoReflect

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

func (*CountersResponse) Reset

func (x *CountersResponse) Reset()

func (*CountersResponse) String

func (x *CountersResponse) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Filters

type Filters struct {
	Ips       []string `protobuf:"bytes,2,rep,name=ips,proto3" json:"ips,omitempty"`
	Protocols []string `protobuf:"bytes,3,rep,name=protocols,proto3" json:"protocols,omitempty"`
	Ports     []string `protobuf:"bytes,4,rep,name=ports,proto3" json:"ports,omitempty"`
	Macs      []string `protobuf:"bytes,5,rep,name=macs,proto3" json:"macs,omitempty"`
	// contains filtered or unexported fields
}

models

func (*Filters) Descriptor deprecated

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

Deprecated: Use Filters.ProtoReflect.Descriptor instead.

func (*Filters) GetIps

func (x *Filters) GetIps() []string

func (*Filters) GetMacs

func (x *Filters) GetMacs() []string

func (*Filters) GetPorts

func (x *Filters) GetPorts() []string

func (*Filters) GetProtocols

func (x *Filters) GetProtocols() []string

func (*Filters) ProtoMessage

func (*Filters) ProtoMessage()

func (*Filters) ProtoReflect

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

func (*Filters) Reset

func (x *Filters) Reset()

func (*Filters) String

func (x *Filters) String() string

type HCNRequest

type HCNRequest struct {
	Hcntype HCNType `protobuf:"varint,1,opt,name=hcntype,proto3,enum=wcnspect.hcn.HCNType" json:"hcntype,omitempty"`
	Verbose bool    `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"`
	// contains filtered or unexported fields
}

requests

func (*HCNRequest) Descriptor deprecated

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

Deprecated: Use HCNRequest.ProtoReflect.Descriptor instead.

func (*HCNRequest) GetHcntype

func (x *HCNRequest) GetHcntype() HCNType

func (*HCNRequest) GetVerbose

func (x *HCNRequest) GetVerbose() bool

func (*HCNRequest) ProtoMessage

func (*HCNRequest) ProtoMessage()

func (*HCNRequest) ProtoReflect

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

func (*HCNRequest) Reset

func (x *HCNRequest) Reset()

func (*HCNRequest) String

func (x *HCNRequest) String() string

type HCNResponse

type HCNResponse struct {
	HcnResult []byte `protobuf:"bytes,1,opt,name=hcn_result,json=hcnResult,proto3" json:"hcn_result,omitempty"`
	// contains filtered or unexported fields
}

responses

func (*HCNResponse) Descriptor deprecated

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

Deprecated: Use HCNResponse.ProtoReflect.Descriptor instead.

func (*HCNResponse) GetHcnResult

func (x *HCNResponse) GetHcnResult() []byte

func (*HCNResponse) ProtoMessage

func (*HCNResponse) ProtoMessage()

func (*HCNResponse) ProtoReflect

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

func (*HCNResponse) Reset

func (x *HCNResponse) Reset()

func (*HCNResponse) String

func (x *HCNResponse) String() string

type HCNServiceClient

type HCNServiceClient interface {
	GetHCNLogs(ctx context.Context, in *HCNRequest, opts ...grpc.CallOption) (*HCNResponse, error)
}

HCNServiceClient is the client API for HCNService 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 NewHCNServiceClient

func NewHCNServiceClient(cc grpc.ClientConnInterface) HCNServiceClient

type HCNServiceServer

type HCNServiceServer interface {
	GetHCNLogs(context.Context, *HCNRequest) (*HCNResponse, error)
	// contains filtered or unexported methods
}

HCNServiceServer is the server API for HCNService service. All implementations must embed UnimplementedHCNServiceServer for forward compatibility

type HCNType

type HCNType int32
const (
	HCNType_all           HCNType = 0
	HCNType_endpoints     HCNType = 1
	HCNType_loadbalancers HCNType = 2
	HCNType_namespaces    HCNType = 3
	HCNType_networks      HCNType = 4
)

func (HCNType) Descriptor

func (HCNType) Descriptor() protoreflect.EnumDescriptor

func (HCNType) Enum

func (x HCNType) Enum() *HCNType

func (HCNType) EnumDescriptor deprecated

func (HCNType) EnumDescriptor() ([]byte, []int)

Deprecated: Use HCNType.Descriptor instead.

func (HCNType) Number

func (x HCNType) Number() protoreflect.EnumNumber

func (HCNType) String

func (x HCNType) String() string

func (HCNType) Type

func (HCNType) Type() protoreflect.EnumType

type Modifiers

type Modifiers struct {
	Pods         []string   `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"`
	PacketType   PacketType `` /* 126-byte string literal not displayed */
	CountersOnly bool       `protobuf:"varint,5,opt,name=counters_only,json=countersOnly,proto3" json:"counters_only,omitempty"`
	// contains filtered or unexported fields
}

func (*Modifiers) Descriptor deprecated

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

Deprecated: Use Modifiers.ProtoReflect.Descriptor instead.

func (*Modifiers) GetCountersOnly

func (x *Modifiers) GetCountersOnly() bool

func (*Modifiers) GetPacketType

func (x *Modifiers) GetPacketType() PacketType

func (*Modifiers) GetPods

func (x *Modifiers) GetPods() []string

func (*Modifiers) ProtoMessage

func (*Modifiers) ProtoMessage()

func (*Modifiers) ProtoReflect

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

func (*Modifiers) Reset

func (x *Modifiers) Reset()

func (*Modifiers) String

func (x *Modifiers) String() string

type PacketType

type PacketType int32
const (
	PacketType_all  PacketType = 0
	PacketType_flow PacketType = 1
	PacketType_drop PacketType = 2
)

func (PacketType) Descriptor

func (PacketType) Descriptor() protoreflect.EnumDescriptor

func (PacketType) Enum

func (x PacketType) Enum() *PacketType

func (PacketType) EnumDescriptor deprecated

func (PacketType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PacketType.Descriptor instead.

func (PacketType) Number

func (x PacketType) Number() protoreflect.EnumNumber

func (PacketType) String

func (x PacketType) String() string

func (PacketType) Type

type StopCaptureResponse

type StopCaptureResponse struct {
	Result    string                 `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*StopCaptureResponse) Descriptor deprecated

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

Deprecated: Use StopCaptureResponse.ProtoReflect.Descriptor instead.

func (*StopCaptureResponse) GetResult

func (x *StopCaptureResponse) GetResult() string

func (*StopCaptureResponse) GetTimestamp

func (x *StopCaptureResponse) GetTimestamp() *timestamppb.Timestamp

func (*StopCaptureResponse) ProtoMessage

func (*StopCaptureResponse) ProtoMessage()

func (*StopCaptureResponse) ProtoReflect

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

func (*StopCaptureResponse) Reset

func (x *StopCaptureResponse) Reset()

func (*StopCaptureResponse) String

func (x *StopCaptureResponse) String() string

type UnimplementedCaptureServiceServer

type UnimplementedCaptureServiceServer struct {
}

UnimplementedCaptureServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCaptureServiceServer) GetCounters

func (UnimplementedCaptureServiceServer) GetVFPCounters

func (UnimplementedCaptureServiceServer) StartCapture

func (UnimplementedCaptureServiceServer) StopCapture

type UnimplementedHCNServiceServer

type UnimplementedHCNServiceServer struct {
}

UnimplementedHCNServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedHCNServiceServer) GetHCNLogs

type UnsafeCaptureServiceServer

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

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

type UnsafeHCNServiceServer

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

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

type VFPCountersRequest

type VFPCountersRequest struct {
	Pod     string `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"`
	Verbose bool   `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"`
	// contains filtered or unexported fields
}

func (*VFPCountersRequest) Descriptor deprecated

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

Deprecated: Use VFPCountersRequest.ProtoReflect.Descriptor instead.

func (*VFPCountersRequest) GetPod

func (x *VFPCountersRequest) GetPod() string

func (*VFPCountersRequest) GetVerbose

func (x *VFPCountersRequest) GetVerbose() bool

func (*VFPCountersRequest) ProtoMessage

func (*VFPCountersRequest) ProtoMessage()

func (*VFPCountersRequest) ProtoReflect

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

func (*VFPCountersRequest) Reset

func (x *VFPCountersRequest) Reset()

func (*VFPCountersRequest) String

func (x *VFPCountersRequest) String() string

type VFPCountersResponse

type VFPCountersResponse struct {
	Result    string                 `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*VFPCountersResponse) Descriptor deprecated

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

Deprecated: Use VFPCountersResponse.ProtoReflect.Descriptor instead.

func (*VFPCountersResponse) GetResult

func (x *VFPCountersResponse) GetResult() string

func (*VFPCountersResponse) GetTimestamp

func (x *VFPCountersResponse) GetTimestamp() *timestamppb.Timestamp

func (*VFPCountersResponse) ProtoMessage

func (*VFPCountersResponse) ProtoMessage()

func (*VFPCountersResponse) ProtoReflect

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

func (*VFPCountersResponse) Reset

func (x *VFPCountersResponse) Reset()

func (*VFPCountersResponse) String

func (x *VFPCountersResponse) String() string

Jump to

Keyboard shortcuts

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