Documentation
¶
Overview ¶
package tfplugin for threefold plugin client interface and implementation
Index ¶
- type TFPluginClient
- func (t *TFPluginClient) CancelByProjectName(projectName string) error
- func (t *TFPluginClient) DeployDeployment(ctx context.Context, dl *workloads.Deployment) error
- func (t *TFPluginClient) DeployGatewayName(ctx context.Context, gw *workloads.GatewayNameProxy) error
- func (t *TFPluginClient) DeployNetwork(ctx context.Context, znet *workloads.ZNet) error
- func (t *TFPluginClient) GetAvailableNode(ctx context.Context, options types.NodeFilter, rootfs uint64) (uint32, error)
- func (t *TFPluginClient) GetGridNetwork() string
- func (t *TFPluginClient) ListContractsOfProjectName(projectName string) (graphql.Contracts, error)
- func (t *TFPluginClient) LoadGatewayNameFromGrid(ctx context.Context, nodeID uint32, name string, deploymentName string) (workloads.GatewayNameProxy, error)
- func (t *TFPluginClient) LoadVMFromGrid(ctx context.Context, nodeID uint32, name string, deploymentName string) (workloads.VM, error)
- func (t *TFPluginClient) SetState(nodeID uint32, contractIDs []uint64)
- type TFPluginClientInterface
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 grid-client tfPluginClient
func NewTFPluginClient ¶
func NewTFPluginClient(mnemonics, network string) (TFPluginClient, error)
NewTFPluginClient returns new tfPluginClient given mnemonics and grid network
func (*TFPluginClient) CancelByProjectName ¶
func (t *TFPluginClient) CancelByProjectName(projectName string) error
CancelByProjectName 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 ¶
DeployNetwork deploys a network deployment to Threefold grid
func (*TFPluginClient) GetAvailableNode ¶
func (t *TFPluginClient) GetAvailableNode(ctx context.Context, options types.NodeFilter, rootfs uint64) (uint32, error)
GetAvailableNode returns nodes that match the given filter with rootfs specified in GBs
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(ctx context.Context, nodeID uint32, name string, deploymentName string) (workloads.GatewayNameProxy, error)
LoadGatewayNameFromGrid loads a GatewayName from Threefold grid
func (*TFPluginClient) LoadVMFromGrid ¶
func (t *TFPluginClient) LoadVMFromGrid(ctx context.Context, nodeID uint32, name string, deploymentName string) (workloads.VM, error)
LoadVMFromGrid loads a VM from Threefold grid
func (*TFPluginClient) SetState ¶
func (t *TFPluginClient) SetState(nodeID uint32, contractIDs []uint64)
SetState set the state of tf plugin client
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(ctx context.Context, nodeID uint32, name string, deploymentName string) (workloads.VM, error) LoadGatewayNameFromGrid(ctx context.Context, nodeID uint32, name string, deploymentName string) (workloads.GatewayNameProxy, error) ListContractsOfProjectName(projectName string) (graphql.Contracts, error) CancelByProjectName(projectName string) error GetAvailableNode(ctx context.Context, options types.NodeFilter, rootfs uint64) (uint32, error) GetGridNetwork() string SetState(nodeID uint32, contractIDs []uint64) }
TFPluginClientInterface interface for tfPluginClient