client

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func IsPluginError added in v0.1.2

func IsPluginError(err error) bool

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 string, cmd *exec.Cmd, props map[string]interface{}, yamlContext YAMLContext) (*Client, error)

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, state *types.StateData, apps []*types.AppPlan, deps []*types.DependencyPlan, destroy bool, callback func(*types.ApplyAction)) (ret *plugin_go.ApplyDoneResponse, err error)

func (*Client) GetState

func (c *Client) GetState(ctx context.Context, typ, env string, props map[string]interface{}, lock bool, yamlContext YAMLContext) (ret *plugin_go.GetStateResponse, err error)

func (*Client) Init

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

func (*Client) Plan

func (c *Client) Plan(ctx context.Context, state *types.StateData, apps []*types.AppPlan, deps []*types.DependencyPlan, verify, destroy bool) (ret *plugin_go.PlanResponse, err error)

func (*Client) ReleaseLock

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

func (*Client) SaveState

func (c *Client) SaveState(ctx context.Context, state *types.StateData, typ, env string, props map[string]interface{}) (ret *plugin_go.SaveStateResponse, err error)

func (*Client) Start

func (c *Client) Start(ctx context.Context, yamlContext YAMLContext) 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 NewPluginError added in v0.1.2

func NewPluginError(c *Client, msg string, wrapped error) *PluginError

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 ResponseWithError

type ResponseWithError struct {
	*ResponseWithHeader
	Error error
}

type ResponseWithHeader

type ResponseWithHeader struct {
	Header   plugin_go.ResponseHeader
	Response plugin_go.Response
}

type YAMLContext

type YAMLContext struct {
	Prefix string
	Data   []byte
}

func (*YAMLContext) Error

Jump to

Keyboard shortcuts

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