Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DescribeEndpointRequest ¶
type DescribeEndpointRequest struct {
Name string
}
DescribeEndpointRequest todo
type Endpoint ¶
type Endpoint struct { ID string `bson:"_id" json:"id" validate:"required,lte=64"` // 端点名称 CreateAt ftime.Time `bson:"create_at" json:"create_at,omitempty"` // 创建时间 UpdateAt ftime.Time `bson:"update_at" json:"update_at,omitempty"` // 更新时间 Service string `bson:"service" json:"service,omitempty" validate:"required,lte=64"` // 该功能属于那个服务 Version string `bson:"version" json:"version,omitempty" validate:"required,lte=64"` // 服务那个版本的功能 router.Entry `bson:",inline"` }
Endpoint Service's features
func (*Endpoint) LabelsToStr ¶
LabelsToStr 扁平化标签 action:get;action:list;action-list-echo
func (*Endpoint) ParseLabels ¶
ParseLabels 解析Str格式的label
type QueryEndpointRequest ¶
type QueryEndpointRequest struct {
*request.PageRequest
}
QueryEndpointRequest 查询应用列表
func NewQueryEndpointRequest ¶
func NewQueryEndpointRequest(pageReq *request.PageRequest) *QueryEndpointRequest
NewQueryEndpointRequest 列表查询请求
type RegistryRequest ¶
type RegistryRequest struct { *token.Session Version string `json:"version" validate:"required,lte=32"` Entries []*router.Entry `json:"entries"` }
RegistryRequest 服务注册请求
func NewDefaultRegistryRequest ¶
func NewDefaultRegistryRequest() *RegistryRequest
NewDefaultRegistryRequest todo
func NewRegistryRequest ¶
func NewRegistryRequest(version string, entries []*router.Entry) *RegistryRequest
NewRegistryRequest 注册请求
func (*RegistryRequest) Endpoints ¶
func (req *RegistryRequest) Endpoints() []*Endpoint
Endpoints 功能列表
type Service ¶
type Service interface { QueryEndpoints(req *QueryEndpointRequest) (*Set, error) Registry(req *RegistryRequest) error }
Service token管理服务
Click to show internal directories.
Click to hide internal directories.