servod

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package servod provides functions to manage connection and communication with servod daemon on servo-host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool is a pool of servod to reuse.

Servo are pooled by the `address:port|remote` they are connected to.

Users should call Get, which returns a instance from the pool if available, or creates and returns a new one. The returned servod is not guaranteed to be good, e.g., the connection may have broken while the Client was in the pool.

The user should not close the servod as Pool will close it at the end.

The user should Close the pool after use, to free any resources in the pool.

func NewPool

func NewPool() *Pool

NewPool returns a new Pool. The provided ssh config is used for new SSH connections if pool has none to reuse.

func (*Pool) Close

func (p *Pool) Close() error

Close closes all active servodes.

func (*Pool) Get

func (p *Pool) Get(servoAddr string, servodPort int32, getParams getServoParams) (*servod, error)

Get provides servod from cache or initiate new one.

Jump to

Keyboard shortcuts

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