api

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: AGPL-3.0 Imports: 28 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSwaggerEmbedded

func IsSwaggerEmbedded() bool

Types

type API

type API struct {
	v1.GatewayDAdminAPIServiceServer

	Options        *Options
	Config         *config.Config
	PluginRegistry *plugin.Registry
	Pools          map[string]map[string]*pool.Pool
	Proxies        map[string]map[string]*network.Proxy
	Servers        map[string]*network.Server
	// contains filtered or unexported fields
}

func (*API) AddPeer added in v0.10.2

func (a *API) AddPeer(ctx context.Context, req *v1.AddPeerRequest) (*v1.AddPeerResponse, error)

AddPeer adds a new peer to the raft cluster.

func (*API) GetGlobalConfig

func (a *API) GetGlobalConfig(_ context.Context, group *v1.Group) (*structpb.Struct, error)

GetGlobalConfig returns the global configuration of the GatewayD.

func (*API) GetPeers added in v0.10.2

func (a *API) GetPeers(context.Context, *emptypb.Empty) (*structpb.Struct, error)

GetPeers returns the raft peers configuration of the GatewayD.

func (*API) GetPluginConfig

func (a *API) GetPluginConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error)

GetPluginConfig returns the plugin configuration of the GatewayD.

func (*API) GetPlugins

func (a *API) GetPlugins(context.Context, *emptypb.Empty) (*v1.PluginConfigs, error)

GetPlugins returns the active plugin configuration of the GatewayD.

func (*API) GetPools

func (a *API) GetPools(context.Context, *emptypb.Empty) (*structpb.Struct, error)

GetPools returns the pool configuration of the GatewayD.

func (*API) GetProxies

func (a *API) GetProxies(context.Context, *emptypb.Empty) (*structpb.Struct, error)

GetProxies returns the proxy configuration of the GatewayD.

func (*API) GetServers

func (a *API) GetServers(context.Context, *emptypb.Empty) (*structpb.Struct, error)

GetServers returns the server configuration of the GatewayD.

func (*API) RemovePeer added in v0.10.2

func (a *API) RemovePeer(ctx context.Context, req *v1.RemovePeerRequest) (*v1.RemovePeerResponse, error)

RemovePeer removes a peer from the raft cluster.

func (*API) Version

func (a *API) Version(context.Context, *emptypb.Empty) (*v1.VersionResponse, error)

Version returns the version information of the GatewayD.

type GRPCServer added in v0.9.3

type GRPCServer struct {
	API *API

	*HealthChecker
	// contains filtered or unexported fields
}

func NewGRPCServer added in v0.9.3

func NewGRPCServer(ctx context.Context, server GRPCServer) *GRPCServer

NewGRPCServer creates a new gRPC server.

func (*GRPCServer) Shutdown added in v0.9.3

func (s *GRPCServer) Shutdown(context.Context)

Shutdown shuts down the gRPC server.

func (*GRPCServer) Start added in v0.9.3

func (s *GRPCServer) Start()

Start starts the gRPC server.

type HTTPServer added in v0.9.3

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

func NewHTTPServer added in v0.9.3

func NewHTTPServer(options *Options) *HTTPServer

NewHTTPServer creates a new HTTP server.

func (*HTTPServer) Shutdown added in v0.9.3

func (s *HTTPServer) Shutdown(ctx context.Context)

Shutdown shuts down the HTTP server.

func (*HTTPServer) Start added in v0.9.3

func (s *HTTPServer) Start()

Start starts the HTTP server.

type HealthChecker added in v0.8.4

type HealthChecker struct {
	grpc_health_v1.UnimplementedHealthServer

	Servers map[string]*network.Server
	// contains filtered or unexported fields
}

func (*HealthChecker) Check added in v0.8.4

func (*HealthChecker) Watch added in v0.8.4

type Healthz added in v0.8.4

type Healthz struct {
	Status string `json:"status"`
}

type IAPIServer added in v0.9.3

type IAPIServer interface {
	Start()
	Shutdown(ctx context.Context)
}

type Options

type Options struct {
	Logger      zerolog.Logger
	GRPCNetwork string
	GRPCAddress string
	HTTPAddress string
	Servers     map[string]*network.Server
	RaftNode    *raft.Node
}

Directories

Path Synopsis
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

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