shoes

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	AddInstance(ctx context.Context, runnerID, setupScript string) (string, string, string, error)
	DeleteInstance(ctx context.Context, cloudID string) error
}

Client is plugin client interface

func GetClient

func GetClient() (Client, func(), error)

GetClient retrieve ShoesClient use shoes-plugin

type GRPCClient

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

GRPCClient is plugin client implement

func (*GRPCClient) AddInstance

func (c *GRPCClient) AddInstance(ctx context.Context, runnerName, setupScript string) (string, string, string, error)

AddInstance create instance for runner

func (*GRPCClient) DeleteInstance

func (c *GRPCClient) DeleteInstance(ctx context.Context, cloudID string) error

DeleteInstance delete instance for runner

type Plugin

type Plugin struct {
	plugin.Plugin

	Impl Client
}

Plugin is plugin implement

func (*Plugin) GRPCClient

func (p *Plugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

GRPCClient is client

func (*Plugin) GRPCServer

func (p *Plugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

GRPCServer is server

Jump to

Keyboard shortcuts

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