adapter

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AdaptedLocationType = "hostspool"

AdaptedLocationType is the location target for adapter

Variables

This section is empty.

Functions

func IsBadRequestError

func IsBadRequestError(err error) bool

IsBadRequestError checks if an error is an error due to a bad input

Types

type LocationAdapter

type LocationAdapter interface {
	CreateLocationConfiguration(locationName string, props config.DynamicMap) error
	GetLocationConfiguration(locationName string) (config.DynamicMap, error)
	SetLocationConfiguration(locationName string, props config.DynamicMap) error
	RemoveLocation(locationName string) error
	GetLocations() (map[string]config.DynamicMap, error)
	ListLocations() ([]string, error)
}

LocationAdapter interface represents the behaviour of a specific adapter for locations management

func NewHostsPoolLocationAdapter

func NewHostsPoolLocationAdapter(client *api.Client, cfg config.Configuration) LocationAdapter

NewHostsPoolLocationAdapter allows to create a new hostsPool location adapter

func NewHostsPoolLocationAdapterWithSSHFactory

func NewHostsPoolLocationAdapterWithSSHFactory(client *api.Client, cfg config.Configuration, sshClientFactory hostspool.SSHClientFactory) LocationAdapter

NewHostsPoolLocationAdapterWithSSHFactory creates a Location Adapter with a given ssh factory

Currently this is used for testing purpose to mock the ssh connection.

Jump to

Keyboard shortcuts

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