tfplugin

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

package tfplugin for threefold plugin client interface and implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TFPluginClient

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

tfPluginClient wraps grid3-go tfPluginClient

func NewTFPluginClient

func NewTFPluginClient(mnemonics, network string) (TFPluginClient, error)

NewTFPluginClient returns new tfPluginClient given mnemonics and grid network

func (*TFPluginClient) CancelContract

func (t *TFPluginClient) CancelContract(contractID uint64) error

CancelContract cancels a contract on Threefold grid

func (*TFPluginClient) DeployDeployment

func (t *TFPluginClient) DeployDeployment(ctx context.Context, dl *workloads.Deployment) error

DeployDeployment deploys a deployment to Threefold grid

func (*TFPluginClient) DeployGatewayName

func (t *TFPluginClient) DeployGatewayName(ctx context.Context, gw *workloads.GatewayNameProxy) error

DeployNameGateway deploys a GatewayName deployment to Threefold grid

func (*TFPluginClient) DeployNetwork

func (t *TFPluginClient) DeployNetwork(ctx context.Context, znet *workloads.ZNet) error

DeployNetwork deploys a network deployment to Threefold grid

func (*TFPluginClient) FilterNodes

func (t *TFPluginClient) FilterNodes(filter types.NodeFilter, pagination types.Limit) (res []types.Node, totalCount int, err error)

FilterNodes retruns nodes that match the given filter

func (*TFPluginClient) GetDeployment

func (t *TFPluginClient) GetDeployment(nodeID uint32, contractID uint64) (gridtypes.Deployment, error)

GetDeployment returns a deployment using node ID and it's contract ID

func (*TFPluginClient) GetGridNetwork

func (t *TFPluginClient) GetGridNetwork() string

GetGridNetwork returns the current grid network

func (*TFPluginClient) ListContractsOfProjectName

func (t *TFPluginClient) ListContractsOfProjectName(projectName string) (graphql.Contracts, error)

ListContractsOfProjectName returns contracts for a project name from Threefold grid

func (*TFPluginClient) LoadGatewayNameFromGrid

func (t *TFPluginClient) LoadGatewayNameFromGrid(nodeID uint32, name string, deploymentName string) (workloads.GatewayNameProxy, error)

LoadGatewayNameFromGrid loads a GatewayName from Threefold grid

func (*TFPluginClient) LoadVMFromGrid

func (t *TFPluginClient) LoadVMFromGrid(nodeID uint32, name string, deploymentName string) (workloads.VM, error)

LoadVMFromGrid loads a VM from Threefold grid

type TFPluginClientInterface

type TFPluginClientInterface interface {
	DeployNetwork(ctx context.Context, znet *workloads.ZNet) error
	DeployDeployment(ctx context.Context, dl *workloads.Deployment) error
	DeployGatewayName(ctx context.Context, gw *workloads.GatewayNameProxy) error
	LoadVMFromGrid(nodeID uint32, name string, deploymentName string) (workloads.VM, error)
	LoadGatewayNameFromGrid(nodeID uint32, name string, deploymentName string) (workloads.GatewayNameProxy, error)
	ListContractsOfProjectName(projectName string) (graphql.Contracts, error)
	CancelContract(contractID uint64) error
	FilterNodes(filter types.NodeFilter, pagination types.Limit) (res []types.Node, totalCount int, err error)
	GetGridNetwork() string
	GetDeployment(nodeID uint32, contractID uint64) (gridtypes.Deployment, error)
}

TFPluginClientInterface interface for tfPluginClient

Jump to

Keyboard shortcuts

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