client

package
v0.0.0-...-c475c2f Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BUFFER_SIZE = 65536
View Source
const DEFAULT_TIMEOUT = 10 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

func NewClient

func NewClient(target string) (*Client, error)

func NewClientFromConfiguration

func NewClientFromConfiguration(configurationPath string, clusterName string) (*Client, error)

func (*Client) AddHost

func (self *Client) AddHost(gossipAddress string) error

func (*Client) Close

func (self *Client) Close() error

func (*Client) DeployService

func (self *Client) DeployService(serviceNamespace string, serviceName string, templateNamespace string, templateName string, inputs map[string]any, async bool) error

func (*Client) GetPackageFile

func (self *Client) GetPackageFile(namespace string, type_ string, name string, path string, coerce bool, writer io.Writer) error

func (*Client) GetVersion

func (self *Client) GetVersion() (string, error)

func (*Client) Interact

func (self *Client) Interact(identifier []string, stdin io.Reader, stdout io.Writer, stderr io.Writer, terminal *exec.Terminal, environment map[string]string, command ...string) error

func (*Client) InteractRelay

func (self *Client) InteractRelay(server api.Agent_InteractServer, start *api.Interaction_Start) error

func (*Client) ListHosts

func (self *Client) ListHosts() ([]Host, error)

func (*Client) ListNamespaces

func (self *Client) ListNamespaces() ([]string, error)

func (*Client) ListPackageFiles

func (self *Client) ListPackageFiles(namespace string, type_ string, name string) ([]PackageFile, error)

func (*Client) ListPackages

func (self *Client) ListPackages(namespace string, type_ string) ([]PackageIdentifier, error)

func (*Client) ListResources

func (self *Client) ListResources(namespace string, serviceName string, type_ string) ([]Resource, error)

func (*Client) RemovePackage

func (self *Client) RemovePackage(namespace string, type_ string, name string) error

func (*Client) SetPackageFiles

func (self *Client) SetPackageFiles(context contextpkg.Context, namespace string, type_ string, name string, streamPackage streampackage.StreamPackage) error

type Host

type Host struct {
	Name        string `yaml:"name" json:"name"`
	GRPCAddress string `yaml:"grpcAddress" json:"grpcAddress"`
}

type PackageFile

type PackageFile struct {
	Path       string
	Executable bool
}

type PackageIdentifier

type PackageIdentifier struct {
	Namespace string `json:"namespace" yaml:"namespace"`
	Type      string `json:"type" yaml:"type"`
	Name      string `json:"name" yaml:"name"`
}

type Resource

type Resource struct {
	Namespace string `json:"namespace" yaml:"namespace"`
	Service   string `json:"service" yaml:"service"`
	Type      string `json:"type" yaml:"type"`
	Name      string `json:"name" yaml:"name"`
	Host      string `json:"host" yaml:"host"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳