server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dataplane

type Dataplane struct {
	ID string
	// contains filtered or unexported fields
}

Dataplane implements the server and api client which sends authorization to the control plane. Assumption: The caller implements lock mechanism which operating with clusters and listeners.

func NewDataplane

func NewDataplane(dataplaneID, controlplaneTarget, peerName string, parsedCertData *utiltls.ParsedCertData) *Dataplane

NewDataplane returns a new dataplane HTTP server.

func (*Dataplane) AddCluster

func (d *Dataplane) AddCluster(c *cluster.Cluster)

AddCluster adds/updates a cluster to the map.

func (*Dataplane) AddListener

func (d *Dataplane) AddListener(ln *listener.Listener)

AddListener adds a listener to the map.

func (*Dataplane) CreateListener

func (d *Dataplane) CreateListener(name, ip string, port uint32)

CreateListener starts a listener to an imported service.

func (*Dataplane) GetClusterHost

func (d *Dataplane) GetClusterHost(name string) (string, error)

GetClusterHost returns the cluster hostname after trimming ":".

func (*Dataplane) GetClusterTarget

func (d *Dataplane) GetClusterTarget(name string) (string, error)

GetClusterTarget returns the cluster address:port from the cluster map.

func (*Dataplane) GetClusters

func (d *Dataplane) GetClusters() map[string]*cluster.Cluster

GetClusters returns the clusters map.

func (*Dataplane) GetListeners

func (d *Dataplane) GetListeners() map[string]*listener.Listener

GetListeners returns the listeners map.

func (*Dataplane) RemoveCluster

func (d *Dataplane) RemoveCluster(name string)

RemoveCluster adds a cluster to the map.

func (*Dataplane) RemoveListener

func (d *Dataplane) RemoveListener(name string)

RemoveListener removes a listener.

func (*Dataplane) StartDataplaneServer

func (d *Dataplane) StartDataplaneServer(dataplaneServerAddress string) error

StartDataplaneServer starts the Dataplane server.

func (*Dataplane) StartSNIServer

func (d *Dataplane) StartSNIServer(dataplaneServerAddress string) error

StartSNIServer starts the SNI Proxy in the dataplane.

Jump to

Keyboard shortcuts

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