Documentation ¶
Index ¶
- Constants
- func Drivers() []string
- func InitGateway(ctx context.Context, clusterId string, client IClientDriver) (err error)
- func Register(name string, factory IFactory)
- func RegisterDynamicResourceDriver(key string, worker Worker)
- func RegisterInitHandleFunc(handleFunc InitHandleFunc)
- func RegisterInitHandler(handle InitHandler)
- type ApiRelease
- type ApplicationRelease
- type AuthConfig
- type Authorization
- type BasicItem
- type ClientConfig
- type DynamicRelease
- type FactoryManager
- type IApplicationClient
- type IClientDriver
- type IDynamicClient
- type IFactory
- type IFactoryManager
- type IPluginSetting
- type IProjectClient
- type IResourceClient
- type IServiceClient
- type ISubscribeClient
- type InitHandleFunc
- type InitHandler
- type MatchRule
- type Plugin
- type PluginConfig
- type ProjectRelease
- type ProxyHeader
- type ServiceRelease
- type SubscribeRelease
- type UpstreamRelease
- type Worker
Constants ¶
View Source
const ( ProfessionOutput = "output" ProfessionCertificate = "certificate" ProfessionRouter = "router" ProfessionApplication = "app" ProfessionService = "service" ProfessionAIProvider = "ai-provider" )
Variables ¶
This section is empty.
Functions ¶
func InitGateway ¶
func InitGateway(ctx context.Context, clusterId string, client IClientDriver) (err error)
func RegisterInitHandleFunc ¶
func RegisterInitHandleFunc(handleFunc InitHandleFunc)
func RegisterInitHandler ¶
func RegisterInitHandler(handle InitHandler)
Types ¶
type ApiRelease ¶
type ApplicationRelease ¶
type ApplicationRelease struct { *BasicItem Labels map[string]string Authorizations []*Authorization }
type AuthConfig ¶
type Authorization ¶
type ClientConfig ¶
type ClientConfig struct { // 请求地址列表 Addresses []string // 认证配置 Auth *AuthConfig }
type DynamicRelease ¶
func (*DynamicRelease) UnmarshalJSON ¶
func (d *DynamicRelease) UnmarshalJSON(bytes []byte) error
type FactoryManager ¶
type FactoryManager struct {
// contains filtered or unexported fields
}
func (*FactoryManager) Drivers ¶
func (f *FactoryManager) Drivers() []string
func (*FactoryManager) GetClient ¶
func (f *FactoryManager) GetClient(name string, config *ClientConfig) (IClientDriver, error)
func (*FactoryManager) Set ¶
func (f *FactoryManager) Set(name string, factory IFactory)
type IApplicationClient ¶
type IApplicationClient IResourceClient[ApplicationRelease]
type IClientDriver ¶
type IClientDriver interface { Project() IProjectClient Application() IApplicationClient Service() IServiceClient Subscribe() ISubscribeClient Dynamic(resource string) (IDynamicClient, error) PluginSetting() IPluginSetting Commit(ctx context.Context) error Rollback(ctx context.Context) error Begin(ctx context.Context) error Close(ctx context.Context) error }
func GetClient ¶
func GetClient(name string, config *ClientConfig) (IClientDriver, error)
type IDynamicClient ¶
type IFactory ¶
type IFactory interface {
Create(config *ClientConfig) (IClientDriver, error)
}
type IFactoryManager ¶
type IFactoryManager interface { Set(name string, factory IFactory) GetClient(name string, config *ClientConfig) (IClientDriver, error) Drivers() []string }
func NewFactoryManager ¶
func NewFactoryManager() IFactoryManager
type IPluginSetting ¶
type IProjectClient ¶
type IProjectClient IResourceClient[ProjectRelease]
type IResourceClient ¶
type IServiceClient ¶
type IServiceClient IResourceClient[ServiceRelease]
type ISubscribeClient ¶
type ISubscribeClient IResourceClient[SubscribeRelease]
type InitHandleFunc ¶
type InitHandleFunc func(ctx context.Context, clusterId string, client IClientDriver) error
func (InitHandleFunc) Init ¶
func (f InitHandleFunc) Init(ctx context.Context, clusterId string, client IClientDriver) error
type InitHandler ¶
type InitHandler interface {
Init(ctx context.Context, clusterId string, client IClientDriver) error
}
type Plugin ¶
type Plugin struct { Disable bool Config plugin_model.ConfigType }
type PluginConfig ¶
type ProjectRelease ¶
type ProjectRelease struct { Id string `json:"id"` Version string `json:"version"` Apis []*ApiRelease `json:"apis"` Upstream *UpstreamRelease `json:"upstreams"` }
type ProxyHeader ¶
type ServiceRelease ¶
type SubscribeRelease ¶
type UpstreamRelease ¶
Click to show internal directories.
Click to hide internal directories.