Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.17.15 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// OperatorAPIServeAddr is the "<ip>:<port>" on which to serve api requests
	// from the operator.
	// Use ":<port>" to bind on all interfaces.
	// Use an empty string to bind on both "127.0.0.1:0" and "[::1]:0".
	OperatorAPIServeAddr = "operator-api-serve-addr"
)
View Source
const (
	// OperatorAPIServeAddrDefault is the default "<ip>:<port>" value on which to serve
	// api requests from the operator.
	OperatorAPIServeAddrDefault = "localhost:9234"
)

Variables

View Source
var MetricsHandlerCell = cell.Module(
	"metrics-handler",
	"Operator metrics HTTP handler",

	cell.Provide(newMetricsHandler),
)
View Source
var ServerCell = cell.Module(
	"cilium-operator-api",
	"Cilium Operator API Server",

	cell.Config(defaultConfig),
	cell.Provide(newServer),
	cell.Invoke(func(Server) {}),
)

Functions

func HealthHandlerCell

func HealthHandlerCell(
	kvstoreEnabled kvstoreEnabledFunc,
	isOperatorLeading isOperatorLeadingFunc,
) cell.Cell

Types

type Config

type Config struct {
	OperatorAPIServeAddr string
}

func (Config) Flags

func (def Config) Flags(flags *pflag.FlagSet)

type Server

type Server interface {
	// Ports returns the ports at which the server is listening
	Ports() []int
}

Jump to

Keyboard shortcuts

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