pbrpc

package
v1.6.2-rc Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IfType_name = map[int32]string{
		0: "TypeENIShare",
		1: "TypeENIExclusive",
	}
	IfType_value = map[string]int32{
		"TypeENIShare":     0,
		"TypeENIExclusive": 1,
	}
)

Enum value maps for IfType.

View Source
var Cello_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "endpoint.Cello",
	HandlerType: (*CelloServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateEndpoint",
			Handler:    _Cello_CreateEndpoint_Handler,
		},
		{
			MethodName: "DeleteEndpoint",
			Handler:    _Cello_DeleteEndpoint_Handler,
		},
		{
			MethodName: "GetPodMetaInfo",
			Handler:    _Cello_GetPodMetaInfo_Handler,
		},
		{
			MethodName: "PatchPodAnnotation",
			Handler:    _Cello_PatchPodAnnotation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "endpoint.proto",
}

Cello_ServiceDesc is the grpc.ServiceDesc for Cello 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_endpoint_proto protoreflect.FileDescriptor

Functions

func RegisterCelloServer

func RegisterCelloServer(s grpc.ServiceRegistrar, srv CelloServer)

Types

type CelloClient

type CelloClient interface {
	CreateEndpoint(ctx context.Context, in *CreateEndpointRequest, opts ...grpc.CallOption) (*CreateEndpointResponse, error)
	DeleteEndpoint(ctx context.Context, in *DeleteEndpointRequest, opts ...grpc.CallOption) (*DeleteEndpointResponse, error)
	GetPodMetaInfo(ctx context.Context, in *GetPodMetaRequest, opts ...grpc.CallOption) (*GetPodMetaResponse, error)
	PatchPodAnnotation(ctx context.Context, in *PatchPodAnnotationRequest, opts ...grpc.CallOption) (*PatchPodAnnotationResponse, error)
}

CelloClient is the client API for Cello 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 NewCelloClient

func NewCelloClient(cc grpc.ClientConnInterface) CelloClient

type CelloServer

type CelloServer interface {
	CreateEndpoint(context.Context, *CreateEndpointRequest) (*CreateEndpointResponse, error)
	DeleteEndpoint(context.Context, *DeleteEndpointRequest) (*DeleteEndpointResponse, error)
	GetPodMetaInfo(context.Context, *GetPodMetaRequest) (*GetPodMetaResponse, error)
	PatchPodAnnotation(context.Context, *PatchPodAnnotationRequest) (*PatchPodAnnotationResponse, error)
	// contains filtered or unexported methods
}

CelloServer is the server API for Cello service. All implementations must embed UnimplementedCelloServer for forward compatibility.

type CreateEndpointRequest

type CreateEndpointRequest struct {
	Name             string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Namespace        string `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	InfraContainerId string `protobuf:"bytes,3,opt,name=InfraContainerId,proto3" json:"InfraContainerId,omitempty"`
	IfName           string `protobuf:"bytes,4,opt,name=IfName,proto3" json:"IfName,omitempty"`
	NetNs            string `protobuf:"bytes,5,opt,name=NetNs,proto3" json:"NetNs,omitempty"`
	// contains filtered or unexported fields
}

详细请求.

func (*CreateEndpointRequest) Descriptor deprecated

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

Deprecated: Use CreateEndpointRequest.ProtoReflect.Descriptor instead.

func (*CreateEndpointRequest) GetIfName

func (x *CreateEndpointRequest) GetIfName() string

func (*CreateEndpointRequest) GetInfraContainerId

func (x *CreateEndpointRequest) GetInfraContainerId() string

func (*CreateEndpointRequest) GetName

func (x *CreateEndpointRequest) GetName() string

func (*CreateEndpointRequest) GetNamespace

func (x *CreateEndpointRequest) GetNamespace() string

func (*CreateEndpointRequest) GetNetNs

func (x *CreateEndpointRequest) GetNetNs() string

func (*CreateEndpointRequest) ProtoMessage

func (*CreateEndpointRequest) ProtoMessage()

func (*CreateEndpointRequest) ProtoReflect

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

func (*CreateEndpointRequest) Reset

func (x *CreateEndpointRequest) Reset()

func (*CreateEndpointRequest) String

func (x *CreateEndpointRequest) String() string

type CreateEndpointResponse

type CreateEndpointResponse struct {
	IfType     IfType              `protobuf:"varint,1,opt,name=IfType,proto3,enum=endpoint.IfType" json:"IfType,omitempty"`
	Interfaces []*NetworkInterface `protobuf:"bytes,2,rep,name=Interfaces,proto3" json:"Interfaces,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateEndpointResponse) Descriptor deprecated

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

Deprecated: Use CreateEndpointResponse.ProtoReflect.Descriptor instead.

func (*CreateEndpointResponse) GetIfType

func (x *CreateEndpointResponse) GetIfType() IfType

func (*CreateEndpointResponse) GetInterfaces

func (x *CreateEndpointResponse) GetInterfaces() []*NetworkInterface

func (*CreateEndpointResponse) ProtoMessage

func (*CreateEndpointResponse) ProtoMessage()

func (*CreateEndpointResponse) ProtoReflect

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

func (*CreateEndpointResponse) Reset

func (x *CreateEndpointResponse) Reset()

func (*CreateEndpointResponse) String

func (x *CreateEndpointResponse) String() string

type DeleteEndpointRequest

type DeleteEndpointRequest struct {
	Name             string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Namespace        string `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	InfraContainerId string `protobuf:"bytes,3,opt,name=InfraContainerId,proto3" json:"InfraContainerId,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteEndpointRequest) Descriptor deprecated

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

Deprecated: Use DeleteEndpointRequest.ProtoReflect.Descriptor instead.

func (*DeleteEndpointRequest) GetInfraContainerId

func (x *DeleteEndpointRequest) GetInfraContainerId() string

func (*DeleteEndpointRequest) GetName

func (x *DeleteEndpointRequest) GetName() string

func (*DeleteEndpointRequest) GetNamespace

func (x *DeleteEndpointRequest) GetNamespace() string

func (*DeleteEndpointRequest) ProtoMessage

func (*DeleteEndpointRequest) ProtoMessage()

func (*DeleteEndpointRequest) ProtoReflect

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

func (*DeleteEndpointRequest) Reset

func (x *DeleteEndpointRequest) Reset()

func (*DeleteEndpointRequest) String

func (x *DeleteEndpointRequest) String() string

type DeleteEndpointResponse

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

func (*DeleteEndpointResponse) Descriptor deprecated

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

Deprecated: Use DeleteEndpointResponse.ProtoReflect.Descriptor instead.

func (*DeleteEndpointResponse) ProtoMessage

func (*DeleteEndpointResponse) ProtoMessage()

func (*DeleteEndpointResponse) ProtoReflect

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

func (*DeleteEndpointResponse) Reset

func (x *DeleteEndpointResponse) Reset()

func (*DeleteEndpointResponse) String

func (x *DeleteEndpointResponse) String() string

type ENI

type ENI struct {
	ID          string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Mac         string `protobuf:"bytes,2,opt,name=Mac,proto3" json:"Mac,omitempty"`
	IPv4Gateway string `protobuf:"bytes,3,opt,name=IPv4Gateway,proto3" json:"IPv4Gateway,omitempty"`
	IPv6Gateway string `protobuf:"bytes,4,opt,name=IPv6Gateway,proto3" json:"IPv6Gateway,omitempty"`
	// Deprecated
	GatewayMac string `protobuf:"bytes,5,opt,name=GatewayMac,proto3" json:"GatewayMac,omitempty"`
	// Deprecated
	Subnet   *IPSet `protobuf:"bytes,6,opt,name=Subnet,proto3" json:"Subnet,omitempty"` // IPNet
	Trunk    bool   `protobuf:"varint,7,opt,name=Trunk,proto3" json:"Trunk,omitempty"`  // use trunk ?
	Vid      uint32 `protobuf:"varint,8,opt,name=Vid,proto3" json:"Vid,omitempty"`
	SlaveMac string `protobuf:"bytes,9,opt,name=SlaveMac,proto3" json:"SlaveMac,omitempty"` // for vlan slave device
	// contains filtered or unexported fields
}

func (*ENI) Descriptor deprecated

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

Deprecated: Use ENI.ProtoReflect.Descriptor instead.

func (*ENI) GetGatewayMac

func (x *ENI) GetGatewayMac() string

func (*ENI) GetID

func (x *ENI) GetID() string

func (*ENI) GetIPv4Gateway

func (x *ENI) GetIPv4Gateway() string

func (*ENI) GetIPv6Gateway

func (x *ENI) GetIPv6Gateway() string

func (*ENI) GetMac

func (x *ENI) GetMac() string

func (*ENI) GetSlaveMac

func (x *ENI) GetSlaveMac() string

func (*ENI) GetSubnet

func (x *ENI) GetSubnet() *IPSet

func (*ENI) GetTrunk

func (x *ENI) GetTrunk() bool

func (*ENI) GetVid

func (x *ENI) GetVid() uint32

func (*ENI) ProtoMessage

func (*ENI) ProtoMessage()

func (*ENI) ProtoReflect

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

func (*ENI) Reset

func (x *ENI) Reset()

func (*ENI) String

func (x *ENI) String() string

type GetPodMetaRequest

type GetPodMetaRequest struct {
	Name             string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Namespace        string `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	InfraContainerId string `protobuf:"bytes,3,opt,name=InfraContainerId,proto3" json:"InfraContainerId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPodMetaRequest) Descriptor deprecated

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

Deprecated: Use GetPodMetaRequest.ProtoReflect.Descriptor instead.

func (*GetPodMetaRequest) GetInfraContainerId

func (x *GetPodMetaRequest) GetInfraContainerId() string

func (*GetPodMetaRequest) GetName

func (x *GetPodMetaRequest) GetName() string

func (*GetPodMetaRequest) GetNamespace

func (x *GetPodMetaRequest) GetNamespace() string

func (*GetPodMetaRequest) ProtoMessage

func (*GetPodMetaRequest) ProtoMessage()

func (*GetPodMetaRequest) ProtoReflect

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

func (*GetPodMetaRequest) Reset

func (x *GetPodMetaRequest) Reset()

func (*GetPodMetaRequest) String

func (x *GetPodMetaRequest) String() string

type GetPodMetaResponse

type GetPodMetaResponse struct {
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetPodMetaResponse) Descriptor deprecated

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

Deprecated: Use GetPodMetaResponse.ProtoReflect.Descriptor instead.

func (*GetPodMetaResponse) GetAnnotations

func (x *GetPodMetaResponse) GetAnnotations() map[string]string

func (*GetPodMetaResponse) ProtoMessage

func (*GetPodMetaResponse) ProtoMessage()

func (*GetPodMetaResponse) ProtoReflect

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

func (*GetPodMetaResponse) Reset

func (x *GetPodMetaResponse) Reset()

func (*GetPodMetaResponse) String

func (x *GetPodMetaResponse) String() string

type IPSet

type IPSet struct {
	IPv4 string `protobuf:"bytes,1,opt,name=IPv4,proto3" json:"IPv4,omitempty"`
	IPv6 string `protobuf:"bytes,2,opt,name=IPv6,proto3" json:"IPv6,omitempty"`
	// contains filtered or unexported fields
}

func (*IPSet) Descriptor deprecated

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

Deprecated: Use IPSet.ProtoReflect.Descriptor instead.

func (*IPSet) GetIPv4

func (x *IPSet) GetIPv4() string

func (*IPSet) GetIPv6

func (x *IPSet) GetIPv6() string

func (*IPSet) ProtoMessage

func (*IPSet) ProtoMessage()

func (*IPSet) ProtoReflect

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

func (*IPSet) Reset

func (x *IPSet) Reset()

func (*IPSet) String

func (x *IPSet) String() string

type IfType

type IfType int32
const (
	IfType_TypeENIShare     IfType = 0
	IfType_TypeENIExclusive IfType = 1
)

func (IfType) Descriptor

func (IfType) Descriptor() protoreflect.EnumDescriptor

func (IfType) Enum

func (x IfType) Enum() *IfType

func (IfType) EnumDescriptor deprecated

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

Deprecated: Use IfType.Descriptor instead.

func (IfType) Number

func (x IfType) Number() protoreflect.EnumNumber

func (IfType) String

func (x IfType) String() string

func (IfType) Type

func (IfType) Type() protoreflect.EnumType

type NetworkInterface

type NetworkInterface struct {
	ENI          *ENI     `protobuf:"bytes,1,opt,name=ENI,proto3" json:"ENI,omitempty"`
	IPv4Addr     string   `protobuf:"bytes,2,opt,name=IPv4Addr,proto3" json:"IPv4Addr,omitempty"` // ipNet
	IPv6Addr     string   `protobuf:"bytes,3,opt,name=IPv6Addr,proto3" json:"IPv6Addr,omitempty"` // ipNet
	IfName       string   `protobuf:"bytes,4,opt,name=IfName,proto3" json:"IfName,omitempty"`
	ExtraRoutes  []*Route `protobuf:"bytes,5,rep,name=ExtraRoutes,proto3" json:"ExtraRoutes,omitempty"`
	DefaultRoute bool     `protobuf:"varint,6,opt,name=DefaultRoute,proto3" json:"DefaultRoute,omitempty"`
	// contains filtered or unexported fields
}

func (*NetworkInterface) Descriptor deprecated

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

Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead.

func (*NetworkInterface) GetDefaultRoute

func (x *NetworkInterface) GetDefaultRoute() bool

func (*NetworkInterface) GetENI

func (x *NetworkInterface) GetENI() *ENI

func (*NetworkInterface) GetExtraRoutes

func (x *NetworkInterface) GetExtraRoutes() []*Route

func (*NetworkInterface) GetIPv4Addr

func (x *NetworkInterface) GetIPv4Addr() string

func (*NetworkInterface) GetIPv6Addr

func (x *NetworkInterface) GetIPv6Addr() string

func (*NetworkInterface) GetIfName

func (x *NetworkInterface) GetIfName() string

func (*NetworkInterface) ProtoMessage

func (*NetworkInterface) ProtoMessage()

func (*NetworkInterface) ProtoReflect

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

func (*NetworkInterface) Reset

func (x *NetworkInterface) Reset()

func (*NetworkInterface) String

func (x *NetworkInterface) String() string

type PatchPodAnnotationRequest

type PatchPodAnnotationRequest struct {
	Name        string            `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Namespace   string            `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PatchPodAnnotationRequest) Descriptor deprecated

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

Deprecated: Use PatchPodAnnotationRequest.ProtoReflect.Descriptor instead.

func (*PatchPodAnnotationRequest) GetAnnotations

func (x *PatchPodAnnotationRequest) GetAnnotations() map[string]string

func (*PatchPodAnnotationRequest) GetName

func (x *PatchPodAnnotationRequest) GetName() string

func (*PatchPodAnnotationRequest) GetNamespace

func (x *PatchPodAnnotationRequest) GetNamespace() string

func (*PatchPodAnnotationRequest) ProtoMessage

func (*PatchPodAnnotationRequest) ProtoMessage()

func (*PatchPodAnnotationRequest) ProtoReflect

func (*PatchPodAnnotationRequest) Reset

func (x *PatchPodAnnotationRequest) Reset()

func (*PatchPodAnnotationRequest) String

func (x *PatchPodAnnotationRequest) String() string

type PatchPodAnnotationResponse

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

func (*PatchPodAnnotationResponse) Descriptor deprecated

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

Deprecated: Use PatchPodAnnotationResponse.ProtoReflect.Descriptor instead.

func (*PatchPodAnnotationResponse) ProtoMessage

func (*PatchPodAnnotationResponse) ProtoMessage()

func (*PatchPodAnnotationResponse) ProtoReflect

func (*PatchPodAnnotationResponse) Reset

func (x *PatchPodAnnotationResponse) Reset()

func (*PatchPodAnnotationResponse) String

func (x *PatchPodAnnotationResponse) String() string

type Route

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

func (*Route) Descriptor deprecated

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

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetDst

func (x *Route) GetDst() string

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) ProtoReflect

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

func (*Route) Reset

func (x *Route) Reset()

func (*Route) String

func (x *Route) String() string

type UnimplementedCelloServer

type UnimplementedCelloServer struct {
}

UnimplementedCelloServer must be embedded to have forward compatible implementations.

func (UnimplementedCelloServer) CreateEndpoint

func (UnimplementedCelloServer) DeleteEndpoint

func (UnimplementedCelloServer) GetPodMetaInfo

type UnsafeCelloServer

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

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

Jump to

Keyboard shortcuts

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