controller

package
v0.0.0-...-23d09d8 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: MIT Imports: 17 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 struct {
	// contains filtered or unexported fields
}

Client is the API client that performs all operations against a Worker.

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient initializes a new API client

func (*Client) Init

func (c *Client) Init(ctx context.Context, name string, image string, codeURI string, res chan *Response)

Init creates a congtainer env

func (*Client) Invoke

func (c *Client) Invoke(ctx context.Context, name string, args []byte, res chan *Response)

Invoke pass a function request to backend

type Config

type Config struct {
	SocketPath string
}

Config is used to initialize controller client It supports adjusting the resource limits

type Response

type Response struct {
	Err  error
	Body *[]byte
}

Response is used in async ret

Jump to

Keyboard shortcuts

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