client

package
v0.1.87 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

func ValidateHandshake

func ValidateHandshake(h *plugin_go.Handshake) error

Types

type Client

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

func NewClient

func NewClient(log logger.Logger, name, env string, cmd *exec.Cmd, hostAddr string, props map[string]interface{}, yamlContext YAMLContext) (*Client, error)

func (*Client) AcquireLocks added in v0.1.48

func (c *Client) AcquireLocks(ctx context.Context, props map[string]interface{}, lockNames []string, lockWait time.Duration, yamlContext *YAMLContext) (map[string]string, error)

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, state *statefile.StateData, apps []*apiv1.AppPlan, deps []*apiv1.DependencyPlan, domains []*apiv1.DomainInfo, args map[string]interface{}, destroy bool, callback func(*apiv1.ApplyAction)) (*apiv1.ApplyDoneResponse, error)

func (*Client) Command added in v0.1.56

func (c *Client) Command(ctx context.Context, req *apiv1.CommandRequest) error

func (*Client) GetState

func (c *Client) GetState(ctx context.Context, typ string, props map[string]interface{}, lock bool, lockWait time.Duration, skipCreate bool, yamlContext *YAMLContext) (ret *apiv1.GetStateResponse_State, err error)

func (*Client) Init

func (c *Client) Init(ctx context.Context) error

func (*Client) Plan

func (c *Client) Plan(ctx context.Context, state *statefile.StateData, apps []*apiv1.AppPlan, deps []*apiv1.DependencyPlan, domains []*apiv1.DomainInfo, args map[string]interface{}, verify, destroy bool) (*apiv1.PlanResponse, error)

func (*Client) ProjectInit added in v0.1.21

func (c *Client) ProjectInit(ctx context.Context, name string, deployPlugins, runPlugins []string, args map[string]interface{}) (*apiv1.ProjectInitResponse, error)

func (*Client) ReleaseLocks added in v0.1.48

func (c *Client) ReleaseLocks(ctx context.Context, props map[string]interface{}, locks map[string]string) error

func (*Client) ReleaseStateLock added in v0.1.47

func (c *Client) ReleaseStateLock(ctx context.Context, typ string, props map[string]interface{}, lockinfo string) error

func (*Client) Run added in v0.1.11

func (c *Client) Run(ctx context.Context, req *apiv1.RunRequest,
	outCh chan<- *apiv1.RunOutputResponse, errCh chan<- error) (*apiv1.RunStartResponse, error)

func (*Client) SaveState

func (c *Client) SaveState(ctx context.Context, state *statefile.StateData, typ string, props map[string]interface{}) (*apiv1.SaveStateResponse, error)

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) Stop

func (c *Client) Stop() error

type PluginError added in v0.1.2

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

func (*PluginError) Error added in v0.1.2

func (e *PluginError) Error() string

func (*PluginError) Unwrap added in v0.1.2

func (e *PluginError) Unwrap() error

type YAMLContext

type YAMLContext struct {
	Prefix string
	Data   []byte
}

Jump to

Keyboard shortcuts

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