svc

package
v0.0.0-...-3e77f05 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_svc_svc_proto protoreflect.FileDescriptor

Functions

func NewSvcEndpoints

func NewSvcEndpoints() []*api.Endpoint

func RegisterSvcHandler

func RegisterSvcHandler(s server.Server, hdlr SvcHandler, opts ...server.HandlerOption) error

Types

type AllSvc

type AllSvc struct {
	SvcInfo []*SvcInfo `protobuf:"bytes,1,rep,name=svc_info,json=svcInfo,proto3" json:"svc_info,omitempty"`
	// contains filtered or unexported fields
}

func (*AllSvc) Descriptor deprecated

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

Deprecated: Use AllSvc.ProtoReflect.Descriptor instead.

func (*AllSvc) GetSvcInfo

func (x *AllSvc) GetSvcInfo() []*SvcInfo

func (*AllSvc) ProtoMessage

func (*AllSvc) ProtoMessage()

func (*AllSvc) ProtoReflect

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

func (*AllSvc) Reset

func (x *AllSvc) Reset()

func (*AllSvc) String

func (x *AllSvc) String() string

type FindAll

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

func (*FindAll) Descriptor deprecated

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

Deprecated: Use FindAll.ProtoReflect.Descriptor instead.

func (*FindAll) ProtoMessage

func (*FindAll) ProtoMessage()

func (*FindAll) ProtoReflect

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

func (*FindAll) Reset

func (x *FindAll) Reset()

func (*FindAll) String

func (x *FindAll) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMsg

func (x *Response) GetMsg() string

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 SvcHandler

type SvcHandler interface {
	//对外提供添加服务
	AddSvc(context.Context, *SvcInfo, *Response) error
	DeleteSvc(context.Context, *SvcId, *Response) error
	UpdateSvc(context.Context, *SvcInfo, *Response) error
	FindSvcByID(context.Context, *SvcId, *SvcInfo) error
	FindAllSvc(context.Context, *FindAll, *AllSvc) error
}

type SvcId

type SvcId struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SvcId) Descriptor deprecated

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

Deprecated: Use SvcId.ProtoReflect.Descriptor instead.

func (*SvcId) GetId

func (x *SvcId) GetId() int64

func (*SvcId) ProtoMessage

func (*SvcId) ProtoMessage()

func (*SvcId) ProtoReflect

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

func (*SvcId) Reset

func (x *SvcId) Reset()

func (*SvcId) String

func (x *SvcId) String() string

type SvcInfo

type SvcInfo struct {
	Id              int64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	SvcNamespace    string     `protobuf:"bytes,2,opt,name=svc_namespace,json=svcNamespace,proto3" json:"svc_namespace,omitempty"`
	SvcName         string     `protobuf:"bytes,3,opt,name=svc_name,json=svcName,proto3" json:"svc_name,omitempty"`
	SvcPodName      string     `protobuf:"bytes,4,opt,name=svc_pod_name,json=svcPodName,proto3" json:"svc_pod_name,omitempty"`
	SvcType         string     `protobuf:"bytes,5,opt,name=svc_type,json=svcType,proto3" json:"svc_type,omitempty"`
	SvcExternalName string     `protobuf:"bytes,6,opt,name=svc_external_name,json=svcExternalName,proto3" json:"svc_external_name,omitempty"`
	SvcTeamId       string     `protobuf:"bytes,7,opt,name=svc_team_id,json=svcTeamId,proto3" json:"svc_team_id,omitempty"`
	SvcPort         []*SvcPort `protobuf:"bytes,8,rep,name=svc_port,json=svcPort,proto3" json:"svc_port,omitempty"`
	// contains filtered or unexported fields
}

func (*SvcInfo) Descriptor deprecated

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

Deprecated: Use SvcInfo.ProtoReflect.Descriptor instead.

func (*SvcInfo) GetId

func (x *SvcInfo) GetId() int64

func (*SvcInfo) GetSvcExternalName

func (x *SvcInfo) GetSvcExternalName() string

func (*SvcInfo) GetSvcName

func (x *SvcInfo) GetSvcName() string

func (*SvcInfo) GetSvcNamespace

func (x *SvcInfo) GetSvcNamespace() string

func (*SvcInfo) GetSvcPodName

func (x *SvcInfo) GetSvcPodName() string

func (*SvcInfo) GetSvcPort

func (x *SvcInfo) GetSvcPort() []*SvcPort

func (*SvcInfo) GetSvcTeamId

func (x *SvcInfo) GetSvcTeamId() string

func (*SvcInfo) GetSvcType

func (x *SvcInfo) GetSvcType() string

func (*SvcInfo) ProtoMessage

func (*SvcInfo) ProtoMessage()

func (*SvcInfo) ProtoReflect

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

func (*SvcInfo) Reset

func (x *SvcInfo) Reset()

func (*SvcInfo) String

func (x *SvcInfo) String() string

type SvcPort

type SvcPort struct {
	Id              int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	SvcId           int64  `protobuf:"varint,2,opt,name=svc_id,json=svcId,proto3" json:"svc_id,omitempty"`
	SvcPort         int64  `protobuf:"varint,3,opt,name=svc_port,json=svcPort,proto3" json:"svc_port,omitempty"`
	SvcTargetPort   int64  `protobuf:"varint,4,opt,name=svc_target_port,json=svcTargetPort,proto3" json:"svc_target_port,omitempty"`
	SvcNodePort     int64  `protobuf:"varint,5,opt,name=svc_node_port,json=svcNodePort,proto3" json:"svc_node_port,omitempty"`
	SvcPortProtocol string `protobuf:"bytes,6,opt,name=svc_port_protocol,json=svcPortProtocol,proto3" json:"svc_port_protocol,omitempty"`
	// contains filtered or unexported fields
}

func (*SvcPort) Descriptor deprecated

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

Deprecated: Use SvcPort.ProtoReflect.Descriptor instead.

func (*SvcPort) GetId

func (x *SvcPort) GetId() int64

func (*SvcPort) GetSvcId

func (x *SvcPort) GetSvcId() int64

func (*SvcPort) GetSvcNodePort

func (x *SvcPort) GetSvcNodePort() int64

func (*SvcPort) GetSvcPort

func (x *SvcPort) GetSvcPort() int64

func (*SvcPort) GetSvcPortProtocol

func (x *SvcPort) GetSvcPortProtocol() string

func (*SvcPort) GetSvcTargetPort

func (x *SvcPort) GetSvcTargetPort() int64

func (*SvcPort) ProtoMessage

func (*SvcPort) ProtoMessage()

func (*SvcPort) ProtoReflect

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

func (*SvcPort) Reset

func (x *SvcPort) Reset()

func (*SvcPort) String

func (x *SvcPort) String() string

type SvcService

type SvcService interface {
	//对外提供添加服务
	AddSvc(ctx context.Context, in *SvcInfo, opts ...client.CallOption) (*Response, error)
	DeleteSvc(ctx context.Context, in *SvcId, opts ...client.CallOption) (*Response, error)
	UpdateSvc(ctx context.Context, in *SvcInfo, opts ...client.CallOption) (*Response, error)
	FindSvcByID(ctx context.Context, in *SvcId, opts ...client.CallOption) (*SvcInfo, error)
	FindAllSvc(ctx context.Context, in *FindAll, opts ...client.CallOption) (*AllSvc, error)
}

func NewSvcService

func NewSvcService(name string, c client.Client) SvcService

Jump to

Keyboard shortcuts

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