rest

package
v0.0.0-...-772ff9c Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: UPL-1.0 Imports: 17 Imported by: 0

Documentation

Overview

Package rest provides a REST server for the Coherence Operator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServerHostAndPort

func GetServerHostAndPort() string

GetServerHostAndPort obtains the host and port that the REST server is listening on of empty string if the server is not started.

Types

type Server

type Server interface {
	// GetAddress returns the address that this server is listening on.
	GetAddress() net.Addr
	// GetPort returns the port that this server is listening on.
	GetPort() int32
	// Close closes this server's listener
	Close() error
	// GetHostAndPort returns the address that the REST server should be reached on by external processes
	GetHostAndPort() string
	// Start the REST server
	Start(ctx context.Context) error
	// SetupWithManager will configure the server to run when the manager starts
	SetupWithManager(mgr ctrl.Manager) error
	// Running closes when the server is running
	Running() <-chan struct{}
}

Server is the Operator REST server.

func NewServer

func NewServer(c kubernetes.Interface) Server

NewServer will create a new REST server

func NewServerWithEndpoints

func NewServerWithEndpoints(c kubernetes.Interface, endpoints map[string]func(w http.ResponseWriter, r *http.Request)) Server

NewServerWithEndpoints will create a new REST server with additional endpoints

Jump to

Keyboard shortcuts

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