proxy

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	ContainerDClient containerdv1.ContainerDCaptureServiceClient
	DiscoverClient   discover.DiscoverServiceClient
}

Endpoint represent a kpture server endpoint in th daemonset

func NewEndpoint

func NewEndpoint(IP string) (*Endpoint, error)

NewEndpoint create a new grpc client to the kpture server endpoint

type Proxy

type Proxy struct {
	k8s.UnimplementedK8SCaptureServiceServer
	discover.UnimplementedDiscoverServiceServer

	DaemonSetEndpoints map[string]*Endpoint
	// contains filtered or unexported fields
}

Proxy represent the kpture proxy

func NewInclusterProxy

func NewInclusterProxy() (*Proxy, error)

NewInclusterProxy create a new grpc server that will proxify the connection from the client to the requested daemonset endpoint

func NewOutclusterProxy

func NewOutclusterProxy(kubeconfig string) (*Proxy, error)

NewOutclusterProxy create a proxy from outside cluster for developement purposes

func (*Proxy) Capture

Capture is the main function of the proxy. It fetches the containerD information from the pod and namespace request and sends it to the kpture containerD server.

func (*Proxy) ServerInformation

func (p *Proxy) ServerInformation(context.Context, *discover.Empty) (*types.ServerInfo, error)

ServerInformation return information about the kpture server It will ask every daemon set endpoint for its information and return them as an array

func (*Proxy) Start

func (p *Proxy) Start()

Start the proxy

func (*Proxy) UpdateDaemonSetMap

func (p *Proxy) UpdateDaemonSetMap() error

UpdateDaemonSetMap update the map of daemonset endpoints

func (*Proxy) WatchDaemonSet

func (p *Proxy) WatchDaemonSet()

WatchDaemonSet watch the daemonset and update the map of daemonset endpoints

Jump to

Keyboard shortcuts

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