client

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

The client package provides an interface and implementation for the Scoot Worker API, as well as a CLI client that wraps it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIAddrToBundlestoreURI

func APIAddrToBundlestoreURI(addr string) string

Create a Bundlestore URI from an addr

func GetScootapiAddr

func GetScootapiAddr() (sched string, api string, err error)

Get the scootapi address (as host:port)

func GetScootapiAddrPath

func GetScootapiAddrPath() string

Get the path of the file containing the address for scootapi to use

Types

type Client

type Client interface {
	// Connection funtions
	Dial() error
	Close() error

	// Worker API Interactions
	QueryWorker() (domain.WorkerStatus, error)
	runner.Controller
	runner.StatusQueryNower
	runner.LegacyStatusReader
}

func NewSimpleClient

func NewSimpleClient(di dialer.Dialer, addr string) (Client, error)

Create basic implementation of Client interface for interaction with Scoot worker API

type WorkersClientJSONConfig

type WorkersClientJSONConfig struct {
	Type          string // transport type: rpc
	PollingPeriod string // polling period default to 250ms
}

Parameters for configuring connections to remote workers.

Jump to

Keyboard shortcuts

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