Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Describe
- func (*Describe) Descriptor() ([]byte, []int)deprecated
- func (x *Describe) GetBandWidth() int32
- func (x *Describe) GetDomain() string
- func (x *Describe) GetIpVersion() string
- func (x *Describe) GetNetworkType() string
- func (x *Describe) GetStatusAt() int64
- func (*Describe) ProtoMessage()
- func (x *Describe) ProtoReflect() protoreflect.Message
- func (x *Describe) Reset()
- func (x *Describe) String() string
- type LoadBalancer
- func (*LoadBalancer) Descriptor() ([]byte, []int)deprecated
- func (x *LoadBalancer) GetDescribe() *Describe
- func (x *LoadBalancer) GetResource() *resource.Resource
- func (*LoadBalancer) ProtoMessage()
- func (x *LoadBalancer) ProtoReflect() protoreflect.Message
- func (x *LoadBalancer) Reset()
- func (x *LoadBalancer) String() string
- type LoadBalancerSet
- func (s *LoadBalancerSet) Add(items ...any)
- func (*LoadBalancerSet) Descriptor() ([]byte, []int)deprecated
- func (x *LoadBalancerSet) GetItems() []*LoadBalancer
- func (s *LoadBalancerSet) GetLast() *LoadBalancer
- func (x *LoadBalancerSet) GetTotal() int64
- func (s *LoadBalancerSet) Length() int64
- func (*LoadBalancerSet) ProtoMessage()
- func (x *LoadBalancerSet) ProtoReflect() protoreflect.Message
- func (x *LoadBalancerSet) Reset()
- func (s *LoadBalancerSet) ResourceIds() (ids []string)
- func (x *LoadBalancerSet) String() string
- func (s *LoadBalancerSet) ToAny() (items []any)
- func (s *LoadBalancerSet) ToJsonString() string
- type QuerySLBRequest
- type STATUS
- func (STATUS) Descriptor() protoreflect.EnumDescriptor
- func (x STATUS) Enum() *STATUS
- func (STATUS) EnumDescriptor() ([]byte, []int)deprecated
- func (t STATUS) Equal(target STATUS) bool
- func (t STATUS) IsIn(targets ...STATUS) bool
- func (t STATUS) MarshalJSON() ([]byte, error)
- func (x STATUS) Number() protoreflect.EnumNumber
- func (x STATUS) String() string
- func (STATUS) Type() protoreflect.EnumType
- func (t *STATUS) UnmarshalJSON(b []byte) error
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
const (
AppName = "lb"
)
Variables ¶
var ( STATUS_name = map[int32]string{ 0: "UNKNOW", 5: "PENDING", 6: "CREATE_FAILED", 11: "RUNNING", 70: "LOCKED", 80: "STOPPED", 81: "DELETING", 90: "DESTROYED", } STATUS_value = map[string]int32{ "UNKNOW": 0, "PENDING": 5, "CREATE_FAILED": 6, "RUNNING": 11, "LOCKED": 70, "STOPPED": 80, "DELETING": 81, "DESTROYED": 90, } )
Enum value maps for STATUS.
var File_apps_lb_pb_lb_proto protoreflect.FileDescriptor
var File_apps_lb_pb_rpc_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infraboard.cmdb.slb.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncSLB", Handler: _Service_SyncSLB_Handler, }, { MethodName: "QuerySLB", Handler: _Service_QuerySLB_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "apps/lb/pb/rpc.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Describe ¶
type Describe struct { // 负载均衡实例的域名,仅公网传统型负载均衡实例才提供该字段 // @gotags: json:"domain" Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain"` // 状态变化的时间 // @gotags: json:"status_at" StatusAt int64 `protobuf:"varint,2,opt,name=status_at,json=statusAt,proto3" json:"status_at"` // IP版本,可以设置为ipv4或者ipv6 // @gotags: json:"ip_version" IpVersion string `protobuf:"bytes,3,opt,name=ip_version,json=ipVersion,proto3" json:"ip_version"` // 私网负载均衡实例的网络类型 vpc:专有网络实例 classic:经典网络实例 // @gotags: json:"network_type" NetworkType string `protobuf:"bytes,4,opt,name=network_type,json=networkType,proto3" json:"network_type"` // 带宽 // @gotags: json:"band_width" BandWidth int32 `protobuf:"varint,5,opt,name=band_width,json=bandWidth,proto3" json:"band_width"` // contains filtered or unexported fields }
func (*Describe) Descriptor
deprecated
func (*Describe) GetBandWidth ¶
func (*Describe) GetIpVersion ¶
func (*Describe) GetNetworkType ¶
func (*Describe) GetStatusAt ¶
func (*Describe) ProtoMessage ¶
func (*Describe) ProtoMessage()
func (*Describe) ProtoReflect ¶
func (x *Describe) ProtoReflect() protoreflect.Message
type LoadBalancer ¶
type LoadBalancer struct { // @gotags: json:"resource" Resource *resource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` // @gotags: json:"describe" Describe *Describe `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe"` // contains filtered or unexported fields }
func NewDefaultLoadBalancer ¶
func NewDefaultLoadBalancer() *LoadBalancer
func (*LoadBalancer) Descriptor
deprecated
func (*LoadBalancer) Descriptor() ([]byte, []int)
Deprecated: Use LoadBalancer.ProtoReflect.Descriptor instead.
func (*LoadBalancer) GetDescribe ¶
func (x *LoadBalancer) GetDescribe() *Describe
func (*LoadBalancer) GetResource ¶
func (x *LoadBalancer) GetResource() *resource.Resource
func (*LoadBalancer) ProtoMessage ¶
func (*LoadBalancer) ProtoMessage()
func (*LoadBalancer) ProtoReflect ¶
func (x *LoadBalancer) ProtoReflect() protoreflect.Message
func (*LoadBalancer) Reset ¶
func (x *LoadBalancer) Reset()
func (*LoadBalancer) String ¶
func (x *LoadBalancer) String() string
type LoadBalancerSet ¶
type LoadBalancerSet struct { // 列表项 Items []*LoadBalancer `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // 总数量 Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func NewLoadBalancerSet ¶
func NewLoadBalancerSet() *LoadBalancerSet
func (*LoadBalancerSet) Add ¶
func (s *LoadBalancerSet) Add(items ...any)
func (*LoadBalancerSet) Descriptor
deprecated
func (*LoadBalancerSet) Descriptor() ([]byte, []int)
Deprecated: Use LoadBalancerSet.ProtoReflect.Descriptor instead.
func (*LoadBalancerSet) GetItems ¶
func (x *LoadBalancerSet) GetItems() []*LoadBalancer
func (*LoadBalancerSet) GetLast ¶
func (s *LoadBalancerSet) GetLast() *LoadBalancer
func (*LoadBalancerSet) GetTotal ¶
func (x *LoadBalancerSet) GetTotal() int64
func (*LoadBalancerSet) Length ¶
func (s *LoadBalancerSet) Length() int64
func (*LoadBalancerSet) ProtoMessage ¶
func (*LoadBalancerSet) ProtoMessage()
func (*LoadBalancerSet) ProtoReflect ¶
func (x *LoadBalancerSet) ProtoReflect() protoreflect.Message
func (*LoadBalancerSet) Reset ¶
func (x *LoadBalancerSet) Reset()
func (*LoadBalancerSet) ResourceIds ¶
func (s *LoadBalancerSet) ResourceIds() (ids []string)
func (*LoadBalancerSet) String ¶
func (x *LoadBalancerSet) String() string
func (*LoadBalancerSet) ToAny ¶
func (s *LoadBalancerSet) ToAny() (items []any)
func (*LoadBalancerSet) ToJsonString ¶
func (s *LoadBalancerSet) ToJsonString() string
type QuerySLBRequest ¶
type QuerySLBRequest struct { // 分页参数 // @gotags: json:"page" Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"` // contains filtered or unexported fields }
func (*QuerySLBRequest) Descriptor
deprecated
func (*QuerySLBRequest) Descriptor() ([]byte, []int)
Deprecated: Use QuerySLBRequest.ProtoReflect.Descriptor instead.
func (*QuerySLBRequest) GetPage ¶
func (x *QuerySLBRequest) GetPage() *request.PageRequest
func (*QuerySLBRequest) ProtoMessage ¶
func (*QuerySLBRequest) ProtoMessage()
func (*QuerySLBRequest) ProtoReflect ¶
func (x *QuerySLBRequest) ProtoReflect() protoreflect.Message
func (*QuerySLBRequest) Reset ¶
func (x *QuerySLBRequest) Reset()
func (*QuerySLBRequest) String ¶
func (x *QuerySLBRequest) String() string
type STATUS ¶
type STATUS int32
const ( // 未知状态 STATUS_UNKNOW STATUS = 0 // 表示创建中 STATUS_PENDING STATUS = 5 // 表示创建失败 STATUS_CREATE_FAILED STATUS = 6 // 表示运行中 STATUS_RUNNING STATUS = 11 // 表示实例已经锁定 STATUS_LOCKED STATUS = 70 // 表示停止 STATUS_STOPPED STATUS = 80 // 表示销毁中 STATUS_DELETING STATUS = 81 // 已销毁 STATUS_DESTROYED STATUS = 90 )
func ParseSTATUSFromString ¶
ParseSTATUSFromString Parse STATUS from string
func (STATUS) Descriptor ¶
func (STATUS) Descriptor() protoreflect.EnumDescriptor
func (STATUS) EnumDescriptor
deprecated
func (STATUS) Number ¶
func (x STATUS) Number() protoreflect.EnumNumber
func (STATUS) Type ¶
func (STATUS) Type() protoreflect.EnumType
type ServiceClient ¶
type ServiceClient interface { SyncSLB(ctx context.Context, in *LoadBalancer, opts ...grpc.CallOption) (*LoadBalancer, error) QuerySLB(ctx context.Context, in *QuerySLBRequest, opts ...grpc.CallOption) (*LoadBalancer, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { SyncSLB(context.Context, *LoadBalancer) (*LoadBalancer, error) QuerySLB(context.Context, *QuerySLBRequest) (*LoadBalancer, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) QuerySLB ¶
func (UnimplementedServiceServer) QuerySLB(context.Context, *QuerySLBRequest) (*LoadBalancer, error)
func (UnimplementedServiceServer) SyncSLB ¶
func (UnimplementedServiceServer) SyncSLB(context.Context, *LoadBalancer) (*LoadBalancer, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.