proxyupdater

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIBase

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

func NewAPIBase

func NewAPIBase(controller ControllerBackend, backend Backend, resources facade.Resources, authorizer facade.Authorizer) (*APIBase, error)

NewAPIBase creates a new server-side API facade with the given Backing.

func (*APIBase) ProxyConfig

func (api *APIBase) ProxyConfig(args params.Entities) params.ProxyConfigResults

ProxyConfig returns the proxy settings for the current model.

func (*APIBase) WatchForProxyConfigAndAPIHostPortChanges

func (api *APIBase) WatchForProxyConfigAndAPIHostPortChanges(args params.Entities) params.NotifyWatchResults

WatchForProxyConfigAndAPIHostPortChanges watches for cleanups to be perfomed in state

type APIv1

type APIv1 struct {
	*APIv2
}

APIv1 provides the ProxyUpdater version 1 facade.

func NewFacadeV1

func NewFacadeV1(ctx facade.Context) (*APIv1, error)

NewFacadeV1 provides the signature required for facade registration and creates a v1 facade.

func (*APIv1) ProxyConfig

func (api *APIv1) ProxyConfig(args params.Entities) params.ProxyConfigResultsV1

ProxyConfig returns the proxy settings for the current model.

type APIv2

type APIv2 struct {
	*APIBase
}

APIv2 provides the ProxyUpdater version 2 facade.

func NewFacadeV2

func NewFacadeV2(ctx facade.Context) (*APIv2, error)

NewFacadeV2 provides the signature required for facade registration and creates a v2 facade.

type Backend

type Backend interface {
	ModelConfig() (*config.Config, error)
	WatchForModelConfigChanges() state.NotifyWatcher
}

Backend defines the model state methods this facade needs, so they can be mocked for testing.

type ControllerBackend

type ControllerBackend interface {
	APIHostPortsForAgents() ([]network.SpaceHostPorts, error)
	WatchAPIHostPortsForAgents() state.NotifyWatcher
}

ControllerBackend defines the controller state methods this facade needs, so they can be mocked for testing.

type ProxyUpdaterV1

type ProxyUpdaterV1 interface {
	ProxyConfig(args params.Entities) params.ProxyConfigResultsV1
	WatchForProxyConfigAndAPIHostPortChanges(args params.Entities) params.NotifyWatchResults
}

ProxyUpdaterV1 defines the pubic methods for the v1 facade.

type ProxyUpdaterV2

type ProxyUpdaterV2 interface {
	ProxyConfig(args params.Entities) params.ProxyConfigResults
	WatchForProxyConfigAndAPIHostPortChanges(args params.Entities) params.NotifyWatchResults
}

ProxyUpdaterV2 defines the pubic methods for the v2 facade.

Jump to

Keyboard shortcuts

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