aigatewaycontroller

package
v2.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package AIGatewayController provides AIGatewayController to manage certificates automatically.

Index

Constants

View Source
const (
	// Category is the category of AIGatewayController.
	Category = supervisor.CategoryBusinessController

	// Kind is the kind of AIGatewayController.
	Kind = "AIGatewayController"
)
View Source
const (
	APIGroupName = "ai_gateway"
	APIPrefix    = "/ai-gateway"
)

Variables

This section is empty.

Functions

func HandlerResults

func HandlerResults() []string

HandlerResults return the results of handler

Types

type AIGatewayController

type AIGatewayController struct {
	// contains filtered or unexported fields
}

AIGatewayController is the controller for AI Gateway.

func (*AIGatewayController) Category

Category returns the category of AIGatewayController.

func (*AIGatewayController) Close

func (agc *AIGatewayController) Close()

Close closes AIGatewayController.

func (*AIGatewayController) DefaultSpec

func (agc *AIGatewayController) DefaultSpec() interface{}

DefaultSpec returns the default spec of AIGatewayController.

func (*AIGatewayController) Handle

func (agc *AIGatewayController) Handle(ctx *context.Context, providerName string, middlewares []string) string

func (*AIGatewayController) Inherit

func (agc *AIGatewayController) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)

Inherit inherits previous generation of AIGatewayController.

func (*AIGatewayController) InheritClose

func (agc *AIGatewayController) InheritClose()

func (*AIGatewayController) Init

func (agc *AIGatewayController) Init(superSpec *supervisor.Spec)

Init initializes AIGatewayController.

func (*AIGatewayController) Kind

func (agc *AIGatewayController) Kind() string

Kind return the kind of AIGatewayController.

func (*AIGatewayController) Status

func (agc *AIGatewayController) Status() *supervisor.Status

Status returns the status of AIGatewayController.

type AIGatewayHandler

type AIGatewayHandler interface {
	Handle(ctx *context.Context, providerName string, middlewares []string) string
}

AIGatewayHandler is used to handle AI traffic.

func GetGlobalAIGatewayHandler

func GetGlobalAIGatewayHandler() (AIGatewayHandler, error)

type HealthCheckResponse

type HealthCheckResponse struct {
	Results []HealthCheckResult `json:"results"`
}

type HealthCheckResult

type HealthCheckResult struct {
	Name         string `json:"name,omitempty"`
	ProviderType string `json:"providerType"`
	Healthy      bool   `json:"healthy"`
	Error        string `json:"error,omitempty"`
}

type Spec

type Spec struct {
	Providers   []*aicontext.ProviderSpec     `json:"providers,omitempty"`
	Middlewares []*middlewares.MiddlewareSpec `json:"middlewares,omitempty"`
}

Spec describes AIGatewayController.

func (*Spec) Validate

func (spec *Spec) Validate() error

Validate validates the spec of AIGatewayController.

type StatsResponse

type StatsResponse struct {
	Stats []*metricshub.MetricStats `json:"stats"`
}

type Status

type Status struct{}

Jump to

Keyboard shortcuts

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