client

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package client provides the bootcfg gRPC client.

Create a bootcfg gRPC client using `client.New`:

cfg := &client.Config{
  Endpoints: []string{"127.0.0.1:8081"},
  DialTimeout: 10 * time.Second,
}
client, err := client.New(cfg)
defer client.Close()

Callers must Close the client after use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Groups   rpcpb.GroupsClient
	Profiles rpcpb.ProfilesClient
	Ignition rpcpb.IgnitionClient
	// contains filtered or unexported fields
}

Client provides a bootcfg client RPC session.

func New

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

New creates a new Client from the given Config.

func (*Client) Close added in v0.4.0

func (c *Client) Close() error

Close closes the client's connections.

type Config

type Config struct {
	// List of endpoint URLs
	Endpoints []string
	// DialTimeout is the timeout for dialing a client connection
	DialTimeout time.Duration
	// Client TLS credentials
	TLS *tls.Config
}

Config configures a Client.

Jump to

Keyboard shortcuts

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