iamclient

package
v0.0.0-...-8f7bd20 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateProvider

type CertificateProvider interface {
	GetCertSerial(certURL string) (serial string, err error)
}

CertificateProvider provides certificate info.

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Client IAM client instance.

func New

func New(
	config *config.Config, sender Sender, cryptocontext *cryptutils.CryptoContext, insecure bool,
) (client *Client, err error)

New creates new IAM client.

func (*Client) Close

func (client *Client) Close() (err error)

Close closes IAM client.

func (*Client) Deprovision

func (client *Client) Deprovision(nodeID, password string) (err error)

Deprovision deprovisions node.

func (*Client) FinishProvisioning

func (client *Client) FinishProvisioning(
	nodeID, password string, certificates []cloudprotocol.IssuedCertData,
) (err error)

FinishProvisioning starts provisioning.

func (*Client) GetAllNodeIDs

func (client *Client) GetAllNodeIDs() (nodeIDs []string, err error)

GetAllNodeIDs returns node ids.

func (*Client) GetCertificate

func (client *Client) GetCertificate(
	certType string, issuer []byte, serial string,
) (certURL, keyURL string, err error)

GetCertificate gets certificate by issuer.

func (*Client) GetCurrentNodeInfo

func (client *Client) GetCurrentNodeInfo() (nodeInfo cloudprotocol.NodeInfo, err error)

GetCurrentNodeInfo returns info for current node.

func (*Client) GetNodeID

func (client *Client) GetNodeID() string

GetNodeID returns node ID.

func (*Client) GetNodeInfo

func (client *Client) GetNodeInfo(nodeID string) (nodeInfo cloudprotocol.NodeInfo, err error)

GetNodeInfo returns node info.

func (*Client) GetSystemID

func (client *Client) GetSystemID() (systemID string)

GetSystemID returns system ID.

func (*Client) InstallCertificates

func (client *Client) InstallCertificates(
	certInfo []cloudprotocol.IssuedCertData, certProvider CertificateProvider,
) error

InstallCertificates applies new issued certificates.

func (*Client) PauseNode

func (client *Client) PauseNode(nodeID string) error

PauseNode pauses node.

func (*Client) RenewCertificatesNotification

func (client *Client) RenewCertificatesNotification(secrets cloudprotocol.UnitSecrets,
	certInfo []cloudprotocol.RenewCertData,
) (err error)

RenewCertificatesNotification renew certificates notification.

func (*Client) ResumeNode

func (client *Client) ResumeNode(nodeID string) error

ResumeNode resumes node.

func (*Client) StartProvisioning

func (client *Client) StartProvisioning(nodeID, password string) (err error)

StartProvisioning starts provisioning.

func (*Client) SubscribeNodeInfoChange

func (client *Client) SubscribeNodeInfoChange() <-chan cloudprotocol.NodeInfo

SubscribeNodeInfoChange subscribes client on NodeInfoChange events.

type Sender

type Sender interface {
	SendIssueUnitCerts(requests []cloudprotocol.IssueCertData) (err error)
	SendInstallCertsConfirmation(confirmations []cloudprotocol.InstallCertData) (err error)
	SendStartProvisioningResponse(response cloudprotocol.StartProvisioningResponse) (err error)
	SendFinishProvisioningResponse(response cloudprotocol.FinishProvisioningResponse) (err error)
	SendDeprovisioningResponse(response cloudprotocol.DeprovisioningResponse) (err error)
}

Sender provides API to send messages to the cloud.

Jump to

Keyboard shortcuts

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