client

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Release added in v1.3.0

func Release() (*selfupdate.Release, error)

func Update added in v1.3.0

func Update(release *selfupdate.Release) error

Types

type Client

type Client struct {
	Username            string // Username for the plattform
	Password            string // Password for teh plattform
	URL                 string // URL of the plattform https://myopenfactory.net/pb/ for example
	ID                  string
	RunWaitTime         time.Duration
	HealthWaitTime      time.Duration
	CertificateNotAfter time.Time
	// contains filtered or unexported fields
}

Config configures variables for the client

func New

func New(logger *log.Logger, identifier string, options ...Option) (*Client, error)

New creates client with given options

func (*Client) Health added in v1.4.0

func (c *Client) Health(ctx context.Context) error

func (*Client) Run

func (c *Client) Run(ctx context.Context) error

Runs client until context is closed

type Option

type Option func(*Client)

func WithClient

func WithClient(client pb.HTTPClient) Option

func WithHealthWaitTime

func WithHealthWaitTime(duration time.Duration) Option

func WithPassword

func WithPassword(password string) Option

func WithProxy added in v1.0.0

func WithProxy(proxy string) Option

func WithRunWaitTime

func WithRunWaitTime(duration time.Duration) Option

func WithURL

func WithURL(url string) Option

func WithUsername

func WithUsername(username string) Option

Jump to

Keyboard shortcuts

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