plugins

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postbuild

type Postbuild interface {
	Process(bloxConfig string) error
}

Postbuild is the interface that we're exposing as a plugin.

type PostbuildPlugin

type PostbuildPlugin struct {
	// Impl Injection
	Impl Postbuild
}

This is the implementation of plugin.Plugin so we can serve/consume this

This has two methods: Server must return an RPC server for this plugin type. We construct a GreeterRPCServer for this.

Client must return an implementation of our interface that communicates over an RPC client. We return GreeterRPC for this.

Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.

func (PostbuildPlugin) Client

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

func (*PostbuildPlugin) Server

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

type PostbuildRPC

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

Here is an implementation that talks over RPC

func (*PostbuildRPC) Process

func (g *PostbuildRPC) Process(bloxConfig string) error

type PostbuildRPCServer

type PostbuildRPCServer struct {
	// This is the real implementation
	Impl Postbuild
}

Here is the RPC server that GreeterRPC talks to, conforming to the requirements of net/rpc

func (*PostbuildRPCServer) Process

func (s *PostbuildRPCServer) Process(bloxConfig string, resp *error) error

type Prebuild

type Prebuild interface {
	Process(bloxConfig string) error
}

Prebuild is the interface that we're exposing as a plugin.

type PrebuildPlugin

type PrebuildPlugin struct {
	// Impl Injection
	Impl Prebuild
}

This is the implementation of plugin.Plugin so we can serve/consume this

This has two methods: Server must return an RPC server for this plugin type. We construct a GreeterRPCServer for this.

Client must return an implementation of our interface that communicates over an RPC client. We return GreeterRPC for this.

Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.

func (PrebuildPlugin) Client

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

func (*PrebuildPlugin) Server

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

type PrebuildRPC

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

Here is an implementation that talks over RPC

func (*PrebuildRPC) Process

func (g *PrebuildRPC) Process(bloxConfig string) error

type PrebuildRPCServer

type PrebuildRPCServer struct {
	// This is the real implementation
	Impl Prebuild
}

Here is the RPC server that GreeterRPC talks to, conforming to the requirements of net/rpc

func (*PrebuildRPCServer) Process

func (s *PrebuildRPCServer) Process(bloxConfig string, resp *error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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