Documentation
¶
Overview ¶
* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. * PilotGo licensed under the Mulan Permissive Software License, Version 2. * See LICENSE file for more details. * Author: zhanghan2021 <zhanghan@kylinos.cn> * Date: Wed Apr 09 10:36:05 2025 +0800
Index ¶
- type CaddyGateway
- func (g *CaddyGateway) GetAllServices() []map[string]interface{}
- func (g *CaddyGateway) GetService(key string) *registry.ServiceInfo
- func (g *CaddyGateway) GetServiceStatus(serviceName string) bool
- func (g *CaddyGateway) Run() error
- func (g *CaddyGateway) SetServiceStatus(serviceName string, status bool) error
- func (g *CaddyGateway) Stop() error
- type ServiceEventCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaddyGateway ¶
type CaddyGateway struct {
// contains filtered or unexported fields
}
func NewCaddyGateway ¶
func NewCaddyGateway(reg registry.Registry, httpAddr string, watchCB ServiceEventCallback) *CaddyGateway
func (*CaddyGateway) GetAllServices ¶
func (g *CaddyGateway) GetAllServices() []map[string]interface{}
获取所有服务
func (*CaddyGateway) GetService ¶
func (g *CaddyGateway) GetService(key string) *registry.ServiceInfo
获取某个服务
func (*CaddyGateway) GetServiceStatus ¶
func (g *CaddyGateway) GetServiceStatus(serviceName string) bool
获取服务状态
func (*CaddyGateway) Run ¶
func (g *CaddyGateway) Run() error
func (*CaddyGateway) SetServiceStatus ¶
func (g *CaddyGateway) SetServiceStatus(serviceName string, status bool) error
设置服务状态
func (*CaddyGateway) Stop ¶
func (g *CaddyGateway) Stop() error
type ServiceEventCallback ¶
type ServiceEventCallback func(eventType registry.EventType, service *registry.ServiceInfo)
Click to show internal directories.
Click to hide internal directories.