config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MPL-2.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 IncusProviderConfig

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

IncusProviderConfig contains the Provider configuration and initialized remote servers.

func NewIncusProvider

func NewIncusProvider(incusConfig *incus_config.Config, acceptServerCert bool) *IncusProviderConfig

NewIncusProvider returns initialized Incus provider structure. This struct is used to store information about this Terraform provider's configuration for reference throughout the lifecycle.

func (*IncusProviderConfig) ImageServer

func (p *IncusProviderConfig) ImageServer(remoteName string) (incus.ImageServer, error)

ImageServer returns an IncusImageServer client for the given remote. An error is returned if the remote is not an ImageServer.

func (*IncusProviderConfig) InstanceServer

func (p *IncusProviderConfig) InstanceServer(remoteName string, project string, target string) (incus.InstanceServer, error)

InstanceServer returns an IncusInstanceServer client for the given remote. An error is returned if the remote is not a InstanceServer.

func (*IncusProviderConfig) SelectRemote

func (p *IncusProviderConfig) SelectRemote(name string) string

SelectRemote returns the specified remote name if it exists, or the default remote name otherwise.

func (*IncusProviderConfig) SetRemote

func (p *IncusProviderConfig) SetRemote(remote IncusProviderRemoteConfig, isDefault bool)

SetRemote set Incusremote for the given name.

type IncusProviderRemoteConfig

type IncusProviderRemoteConfig struct {
	Name         string
	Address      string
	Port         string
	Token        string
	Scheme       string
	Bootstrapped bool
}

IncusProviderRemoteConfig represents Incus remote/server data as defined in a user's Terraform schema/configuration.

Jump to

Keyboard shortcuts

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