client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: MIT Imports: 19 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 {
	Username   string // Username for the plattform
	Password   string // Password for teh plattform
	URL        string // URL of the plattform https://myopenfactory.net/pb/ for example
	ClientCert string // User client certificate in pem format
	CA         string // ca file for connections to the plattform

	ID             string
	RunWaitTime    time.Duration
	HealthWaitTime time.Duration
	// contains filtered or unexported fields
}

Config configures variables for the client

func New

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

New creates client with given options

func (*Client) Run

func (c *Client) Run() error

Runs client until context is closed

func (*Client) Shutdown

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

type Option

type Option func(*Client)

func WithCA

func WithCA(ca string) Option

func WithCert

func WithCert(cert string) Option

func WithClient

func WithClient(client pb.HTTPClient) Option

func WithHealthWaitTime

func WithHealthWaitTime(duration time.Duration) Option

func WithPassword

func WithPassword(password 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