route

package
v0.0.0-...-684cc1f 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_route_route_proto protoreflect.FileDescriptor

Functions

func NewRouteEndpoints

func NewRouteEndpoints() []*api.Endpoint

func RegisterRouteHandler

func RegisterRouteHandler(s server.Server, hdlr RouteHandler, opts ...server.HandlerOption) error

Types

type AllRoute

type AllRoute struct {
	RouteInfo []*RouteInfo `protobuf:"bytes,1,rep,name=route_info,json=routeInfo,proto3" json:"route_info,omitempty"`
	// contains filtered or unexported fields
}

func (*AllRoute) Descriptor deprecated

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

Deprecated: Use AllRoute.ProtoReflect.Descriptor instead.

func (*AllRoute) GetRouteInfo

func (x *AllRoute) GetRouteInfo() []*RouteInfo

func (*AllRoute) ProtoMessage

func (*AllRoute) ProtoMessage()

func (*AllRoute) ProtoReflect

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

func (*AllRoute) Reset

func (x *AllRoute) Reset()

func (*AllRoute) String

func (x *AllRoute) 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 RouteHandler

type RouteHandler interface {
	//对外提供添加服务
	AddRoute(context.Context, *RouteInfo, *Response) error
	DeleteRoute(context.Context, *RouteId, *Response) error
	UpdateRoute(context.Context, *RouteInfo, *Response) error
	FindRouteByID(context.Context, *RouteId, *RouteInfo) error
	FindAllRoute(context.Context, *FindAll, *AllRoute) error
}

type RouteId

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

func (*RouteId) Descriptor deprecated

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

Deprecated: Use RouteId.ProtoReflect.Descriptor instead.

func (*RouteId) GetId

func (x *RouteId) GetId() int64

func (*RouteId) ProtoMessage

func (*RouteId) ProtoMessage()

func (*RouteId) ProtoReflect

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

func (*RouteId) Reset

func (x *RouteId) Reset()

func (*RouteId) String

func (x *RouteId) String() string

type RouteInfo

type RouteInfo struct {
	Id             int64        `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	RouteName      string       `protobuf:"bytes,2,opt,name=route_name,json=routeName,proto3" json:"route_name,omitempty"`
	RouteNamespace string       `protobuf:"bytes,3,opt,name=route_namespace,json=routeNamespace,proto3" json:"route_namespace,omitempty"`
	RouteHost      string       `protobuf:"bytes,4,opt,name=route_host,json=routeHost,proto3" json:"route_host,omitempty"`
	RoutePath      []*RoutePath `protobuf:"bytes,5,rep,name=route_path,json=routePath,proto3" json:"route_path,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteInfo) Descriptor deprecated

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

Deprecated: Use RouteInfo.ProtoReflect.Descriptor instead.

func (*RouteInfo) GetId

func (x *RouteInfo) GetId() int64

func (*RouteInfo) GetRouteHost

func (x *RouteInfo) GetRouteHost() string

func (*RouteInfo) GetRouteName

func (x *RouteInfo) GetRouteName() string

func (*RouteInfo) GetRouteNamespace

func (x *RouteInfo) GetRouteNamespace() string

func (*RouteInfo) GetRoutePath

func (x *RouteInfo) GetRoutePath() []*RoutePath

func (*RouteInfo) ProtoMessage

func (*RouteInfo) ProtoMessage()

func (*RouteInfo) ProtoReflect

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

func (*RouteInfo) Reset

func (x *RouteInfo) Reset()

func (*RouteInfo) String

func (x *RouteInfo) String() string

type RoutePath

type RoutePath struct {
	Id                      int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	RouteId                 int64  `protobuf:"varint,2,opt,name=route_id,json=routeId,proto3" json:"route_id,omitempty"`
	RoutePathName           string `protobuf:"bytes,3,opt,name=route_path_name,json=routePathName,proto3" json:"route_path_name,omitempty"`
	RouteBackendService     string `protobuf:"bytes,4,opt,name=route_backend_service,json=routeBackendService,proto3" json:"route_backend_service,omitempty"`
	RouteBackendServicePort int32  `` /* 135-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RoutePath) Descriptor deprecated

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

Deprecated: Use RoutePath.ProtoReflect.Descriptor instead.

func (*RoutePath) GetId

func (x *RoutePath) GetId() int64

func (*RoutePath) GetRouteBackendService

func (x *RoutePath) GetRouteBackendService() string

func (*RoutePath) GetRouteBackendServicePort

func (x *RoutePath) GetRouteBackendServicePort() int32

func (*RoutePath) GetRouteId

func (x *RoutePath) GetRouteId() int64

func (*RoutePath) GetRoutePathName

func (x *RoutePath) GetRoutePathName() string

func (*RoutePath) ProtoMessage

func (*RoutePath) ProtoMessage()

func (*RoutePath) ProtoReflect

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

func (*RoutePath) Reset

func (x *RoutePath) Reset()

func (*RoutePath) String

func (x *RoutePath) String() string

type RouteService

type RouteService interface {
	//对外提供添加服务
	AddRoute(ctx context.Context, in *RouteInfo, opts ...client.CallOption) (*Response, error)
	DeleteRoute(ctx context.Context, in *RouteId, opts ...client.CallOption) (*Response, error)
	UpdateRoute(ctx context.Context, in *RouteInfo, opts ...client.CallOption) (*Response, error)
	FindRouteByID(ctx context.Context, in *RouteId, opts ...client.CallOption) (*RouteInfo, error)
	FindAllRoute(ctx context.Context, in *FindAll, opts ...client.CallOption) (*AllRoute, error)
}

func NewRouteService

func NewRouteService(name string, c client.Client) RouteService

Jump to

Keyboard shortcuts

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