gateway

package
v0.0.0-...-0dfa492 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MulanPSL-2.0 Imports: 16 Imported by: 0

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

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)

Jump to

Keyboard shortcuts

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