client

package
v0.1.44 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: MIT Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, args map[string]interface{}, destroy bool, callback func(*types.ApplyAction)) (ret *plugin_go.ApplyDoneResponse, err error)

func (*Client) GetState

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

func (*Client) Plan

func (c *Client) Plan(ctx context.Context, state *types.StateData, apps []*types.AppPlan, deps []*types.DependencyPlan, args map[string]interface{}, verify, destroy bool) (ret *plugin_go.PlanResponse, err 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{}) (*plugin_go.ProjectInitResponse, error)

func (*Client) ReleaseLock

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

func (*Client) Run added in v0.1.11

func (c *Client) Run(ctx context.Context, req *plugin_go.RunRequest,
	outCh chan<- *plugin_go.RunOutputResponse, errCh chan<- error) (ret *plugin_go.RunningResponse, err error)

func (*Client) SaveState

func (c *Client) SaveState(ctx context.Context, state *types.StateData, typ string, props map[string]interface{}) (ret *plugin_go.SaveStateResponse, err 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 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 ResponseWithHeader

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

type SenderStream added in v0.1.5

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

func NewSenderStream added in v0.1.5

func NewSenderStream(log logger.Logger, c net.Conn) *SenderStream

func (*SenderStream) Close added in v0.1.5

func (s *SenderStream) Close() error

func (*SenderStream) DrainAndClose added in v0.1.5

func (s *SenderStream) DrainAndClose() error

func (*SenderStream) Recv added in v0.1.5

func (s *SenderStream) Recv() (plugin_go.Response, error)

func (*SenderStream) Send added in v0.1.5

func (s *SenderStream) Send(req plugin_go.Request) error

func (*SenderStream) Wait added in v0.1.41

func (s *SenderStream) Wait() chan struct{}

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