l2

package
v0.0.0-...-a9890c3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LinkStatus_name = map[int32]string{
		0: "DOWN",
		1: "UP",
		2: "MISSING",
	}
	LinkStatus_value = map[string]int32{
		"DOWN":    0,
		"UP":      1,
		"MISSING": 2,
	}
)

Enum value maps for LinkStatus.

Functions

func RegisterL2ServiceServer

func RegisterL2ServiceServer(s *grpc.Server, srv L2ServiceServer)

Types

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 L2ServiceClient

type L2ServiceClient interface {
	AddStack(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*StackResponse, error)
	GetStack(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*StackResponse, error)
	StackStatus(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*StackStatusResponse, error)
	DeleteStack(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*Empty, error)
	WatchStacks(ctx context.Context, in *Empty, opts ...grpc.CallOption) (L2Service_WatchStacksClient, error)
	AddNIC(ctx context.Context, in *NicRequest, opts ...grpc.CallOption) (*Nic, error)
	DeleteNIC(ctx context.Context, in *Nic, opts ...grpc.CallOption) (*Empty, error)
	NICStatus(ctx context.Context, in *Nic, opts ...grpc.CallOption) (*NicStatusResponse, error)
}

L2ServiceClient is the client API for L2Service 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 NewL2ServiceClient

func NewL2ServiceClient(cc grpc.ClientConnInterface) L2ServiceClient

type L2ServiceServer

type L2ServiceServer interface {
	AddStack(context.Context, *StackRequest) (*StackResponse, error)
	GetStack(context.Context, *StackRequest) (*StackResponse, error)
	StackStatus(context.Context, *StackRequest) (*StackStatusResponse, error)
	DeleteStack(context.Context, *StackRequest) (*Empty, error)
	WatchStacks(*Empty, L2Service_WatchStacksServer) error
	AddNIC(context.Context, *NicRequest) (*Nic, error)
	DeleteNIC(context.Context, *Nic) (*Empty, error)
	NICStatus(context.Context, *Nic) (*NicStatusResponse, error)
	// contains filtered or unexported methods
}

L2ServiceServer is the server API for L2Service service. All implementations must embed UnimplementedL2ServiceServer for forward compatibility

type L2Service_WatchStacksClient

type L2Service_WatchStacksClient interface {
	Recv() (*StackChange, error)
	grpc.ClientStream
}

type L2Service_WatchStacksServer

type L2Service_WatchStacksServer interface {
	Send(*StackChange) error
	grpc.ServerStream
}

type LinkStatus

type LinkStatus int32
const (
	LinkStatus_DOWN    LinkStatus = 0
	LinkStatus_UP      LinkStatus = 1
	LinkStatus_MISSING LinkStatus = 2
)

func (LinkStatus) Descriptor

func (LinkStatus) Descriptor() protoreflect.EnumDescriptor

func (LinkStatus) Enum

func (x LinkStatus) Enum() *LinkStatus

func (LinkStatus) EnumDescriptor deprecated

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

Deprecated: Use LinkStatus.Descriptor instead.

func (LinkStatus) Number

func (x LinkStatus) Number() protoreflect.EnumNumber

func (LinkStatus) String

func (x LinkStatus) String() string

func (LinkStatus) Type

type Nic

type Nic struct {
	VpcId  int32    `protobuf:"varint,1,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
	Hwaddr string   `protobuf:"bytes,2,opt,name=hwaddr,proto3" json:"hwaddr,omitempty"`
	Id     string   `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Name   string   `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Index  int32    `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	Vlan   uint32   `protobuf:"varint,6,opt,name=vlan,proto3" json:"vlan,omitempty"`
	Ip     []string `protobuf:"bytes,7,rep,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*Nic) Descriptor deprecated

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

Deprecated: Use Nic.ProtoReflect.Descriptor instead.

func (*Nic) GetHwaddr

func (x *Nic) GetHwaddr() string

func (*Nic) GetId

func (x *Nic) GetId() string

func (*Nic) GetIndex

func (x *Nic) GetIndex() int32

func (*Nic) GetIp

func (x *Nic) GetIp() []string

func (*Nic) GetName

func (x *Nic) GetName() string

func (*Nic) GetVlan

func (x *Nic) GetVlan() uint32

func (*Nic) GetVpcId

func (x *Nic) GetVpcId() int32

func (*Nic) ProtoMessage

func (*Nic) ProtoMessage()

func (*Nic) ProtoReflect

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

func (*Nic) Reset

func (x *Nic) Reset()

func (*Nic) String

func (x *Nic) String() string

type NicRequest

type NicRequest struct {
	VpcId         int32    `protobuf:"varint,1,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
	Id            string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	SubnetVlanId  uint32   `protobuf:"varint,3,opt,name=subnet_vlan_id,json=subnetVlanId,proto3" json:"subnet_vlan_id,omitempty"`
	ManuallyAdded bool     `protobuf:"varint,4,opt,name=manually_added,json=manuallyAdded,proto3" json:"manually_added,omitempty"`
	ManualHwaddr  string   `protobuf:"bytes,5,opt,name=manual_hwaddr,json=manualHwaddr,proto3" json:"manual_hwaddr,omitempty"`
	Ip            []string `protobuf:"bytes,6,rep,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*NicRequest) Descriptor deprecated

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

Deprecated: Use NicRequest.ProtoReflect.Descriptor instead.

func (*NicRequest) GetId

func (x *NicRequest) GetId() string

func (*NicRequest) GetIp

func (x *NicRequest) GetIp() []string

func (*NicRequest) GetManualHwaddr

func (x *NicRequest) GetManualHwaddr() string

func (*NicRequest) GetManuallyAdded

func (x *NicRequest) GetManuallyAdded() bool

func (*NicRequest) GetSubnetVlanId

func (x *NicRequest) GetSubnetVlanId() uint32

func (*NicRequest) GetVpcId

func (x *NicRequest) GetVpcId() int32

func (*NicRequest) ProtoMessage

func (*NicRequest) ProtoMessage()

func (*NicRequest) ProtoReflect

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

func (*NicRequest) Reset

func (x *NicRequest) Reset()

func (*NicRequest) String

func (x *NicRequest) String() string

type NicStatusResponse

type NicStatusResponse struct {
	Status LinkStatus `protobuf:"varint,1,opt,name=status,proto3,enum=vpc.l2.LinkStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*NicStatusResponse) Descriptor deprecated

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

Deprecated: Use NicStatusResponse.ProtoReflect.Descriptor instead.

func (*NicStatusResponse) GetStatus

func (x *NicStatusResponse) GetStatus() LinkStatus

func (*NicStatusResponse) ProtoMessage

func (*NicStatusResponse) ProtoMessage()

func (*NicStatusResponse) ProtoReflect

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

func (*NicStatusResponse) Reset

func (x *NicStatusResponse) Reset()

func (*NicStatusResponse) String

func (x *NicStatusResponse) String() string

type Stack

type Stack struct {
	VpcId           int32  `protobuf:"varint,1,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
	BridgeLinkName  string `protobuf:"bytes,2,opt,name=bridge_link_name,json=bridgeLinkName,proto3" json:"bridge_link_name,omitempty"`
	BridgeLinkIndex int32  `protobuf:"varint,3,opt,name=bridge_link_index,json=bridgeLinkIndex,proto3" json:"bridge_link_index,omitempty"`
	// contains filtered or unexported fields
}

func (*Stack) Descriptor deprecated

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

Deprecated: Use Stack.ProtoReflect.Descriptor instead.

func (*Stack) GetBridgeLinkIndex

func (x *Stack) GetBridgeLinkIndex() int32

func (*Stack) GetBridgeLinkName

func (x *Stack) GetBridgeLinkName() string

func (*Stack) GetVpcId

func (x *Stack) GetVpcId() int32

func (*Stack) ProtoMessage

func (*Stack) ProtoMessage()

func (*Stack) ProtoReflect

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

func (*Stack) Reset

func (x *Stack) Reset()

func (*Stack) String

func (x *Stack) String() string

type StackChange

type StackChange struct {
	VpcId  int32                `protobuf:"varint,1,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
	Action string               `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	Status *StackStatusResponse `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*StackChange) Descriptor deprecated

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

Deprecated: Use StackChange.ProtoReflect.Descriptor instead.

func (*StackChange) GetAction

func (x *StackChange) GetAction() string

func (*StackChange) GetStatus

func (x *StackChange) GetStatus() *StackStatusResponse

func (*StackChange) GetVpcId

func (x *StackChange) GetVpcId() int32

func (*StackChange) ProtoMessage

func (*StackChange) ProtoMessage()

func (*StackChange) ProtoReflect

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

func (*StackChange) Reset

func (x *StackChange) Reset()

func (*StackChange) String

func (x *StackChange) String() string

type StackRequest

type StackRequest struct {
	VpcId int32 `protobuf:"varint,1,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
	// contains filtered or unexported fields
}

func (*StackRequest) Descriptor deprecated

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

Deprecated: Use StackRequest.ProtoReflect.Descriptor instead.

func (*StackRequest) GetVpcId

func (x *StackRequest) GetVpcId() int32

func (*StackRequest) ProtoMessage

func (*StackRequest) ProtoMessage()

func (*StackRequest) ProtoReflect

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

func (*StackRequest) Reset

func (x *StackRequest) Reset()

func (*StackRequest) String

func (x *StackRequest) String() string

type StackResponse

type StackResponse struct {
	Stack  *Stack               `protobuf:"bytes,1,opt,name=stack,proto3" json:"stack,omitempty"`
	Status *StackStatusResponse `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*StackResponse) Descriptor deprecated

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

Deprecated: Use StackResponse.ProtoReflect.Descriptor instead.

func (*StackResponse) GetStack

func (x *StackResponse) GetStack() *Stack

func (*StackResponse) GetStatus

func (x *StackResponse) GetStatus() *StackStatusResponse

func (*StackResponse) ProtoMessage

func (*StackResponse) ProtoMessage()

func (*StackResponse) ProtoReflect

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

func (*StackResponse) Reset

func (x *StackResponse) Reset()

func (*StackResponse) String

func (x *StackResponse) String() string

type StackStatusResponse

type StackStatusResponse struct {
	Bridge    LinkStatus `protobuf:"varint,1,opt,name=bridge,proto3,enum=vpc.l2.LinkStatus" json:"bridge,omitempty"`
	Transport LinkStatus `protobuf:"varint,2,opt,name=transport,proto3,enum=vpc.l2.LinkStatus" json:"transport,omitempty"`
	// contains filtered or unexported fields
}

func (*StackStatusResponse) Descriptor deprecated

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

Deprecated: Use StackStatusResponse.ProtoReflect.Descriptor instead.

func (*StackStatusResponse) GetBridge

func (x *StackStatusResponse) GetBridge() LinkStatus

func (*StackStatusResponse) GetTransport

func (x *StackStatusResponse) GetTransport() LinkStatus

func (*StackStatusResponse) ProtoMessage

func (*StackStatusResponse) ProtoMessage()

func (*StackStatusResponse) ProtoReflect

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

func (*StackStatusResponse) Reset

func (x *StackStatusResponse) Reset()

func (*StackStatusResponse) String

func (x *StackStatusResponse) String() string

type UnimplementedL2ServiceServer

type UnimplementedL2ServiceServer struct {
}

UnimplementedL2ServiceServer must be embedded to have forward compatible implementations.

func (*UnimplementedL2ServiceServer) AddNIC

func (*UnimplementedL2ServiceServer) AddStack

func (*UnimplementedL2ServiceServer) DeleteNIC

func (*UnimplementedL2ServiceServer) DeleteStack

func (*UnimplementedL2ServiceServer) GetStack

func (*UnimplementedL2ServiceServer) NICStatus

func (*UnimplementedL2ServiceServer) StackStatus

func (*UnimplementedL2ServiceServer) WatchStacks

Jump to

Keyboard shortcuts

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