shared

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion: 1,

	MagicCookieKey:   "SKAFFOLD_BUILDER_PLUGIN",
	MagicCookieValue: "hello",
}

Handshake is a common handshake that is shared by plugin and host.

View Source
var PluginMap = map[string]plugin.Plugin{
	"docker": &BuilderPlugin{},
	"bazel":  &BuilderPlugin{},
}

PluginMap is a map of all accepted plugins

Functions

This section is empty.

Types

type BuildArgs

type BuildArgs struct {
	tag.ImageTags
	Artifacts []*latest.Artifact
}

BuildArgs are the args passed via rpc to the builder plugin on Build()

type BuilderPlugin

type BuilderPlugin struct {
	Impl PluginBuilder
}

BuilderPlugin is the implementation of the hashicorp plugin.Plugin interface

func (BuilderPlugin) Client

func (BuilderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*BuilderPlugin) Server

func (p *BuilderPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type BuilderRPC

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

BuilderRPC is an implementation of an rpc client

func (*BuilderRPC) Build

func (b *BuilderRPC) Build(ctx context.Context, out io.Writer, tags tag.ImageTags, artifacts []*latest.Artifact) ([]build.Artifact, error)

func (*BuilderRPC) DependenciesForArtifact added in v0.24.0

func (b *BuilderRPC) DependenciesForArtifact(ctx context.Context, artifact *latest.Artifact) ([]string, error)

func (*BuilderRPC) Init

func (*BuilderRPC) Labels

func (b *BuilderRPC) Labels() map[string]string

type BuilderRPCServer

type BuilderRPCServer struct {
	Impl PluginBuilder
}

BuilderRPCServer is the RPC server that BuilderRPC talks to, conforming to the requirements of net/rpc

func (*BuilderRPCServer) Build

func (s *BuilderRPCServer) Build(b BuildArgs, resp *[]build.Artifact) error

func (*BuilderRPCServer) DependenciesForArtifact added in v0.24.0

func (s *BuilderRPCServer) DependenciesForArtifact(d DependencyArgs, resp *[]string) error

func (*BuilderRPCServer) Init

func (s *BuilderRPCServer) Init(args InitArgs, resp *interface{}) error

func (*BuilderRPCServer) Labels

func (s *BuilderRPCServer) Labels(args interface{}, resp *map[string]string) error

type DependencyArgs added in v0.24.0

type DependencyArgs struct {
	*latest.Artifact
}

DependencyArgs are args passed via rpc to the build plugin on DependencyForArtifact()

type InitArgs

type InitArgs struct {
	Opts *config.SkaffoldOptions
	Env  *latest.ExecutionEnvironment
}

InitArgs are args passed via rpc to the builder plugin on Init()

type PluginBuilder

type PluginBuilder interface {
	Init(opts *config.SkaffoldOptions, env *latest.ExecutionEnvironment)
	build.Builder
}

Jump to

Keyboard shortcuts

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