matchbox: Index | Files

package client

import ""

Package client provides the matchbox gRPC client.

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

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

Callers must Close the client after use.


Package Files

client.go doc.go

type Client Uses

type Client struct {
    Groups   rpcpb.GroupsClient
    Profiles rpcpb.ProfilesClient
    Ignition rpcpb.IgnitionClient
    Generic  rpcpb.GenericClient
    Select   rpcpb.SelectClient
    // contains filtered or unexported fields

Client provides a matchbox client RPC session.

func New Uses

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

New creates a new Client from the given Config.

func (*Client) Close Uses

func (c *Client) Close() error

Close closes the client's connections.

type Config Uses

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.

Package client imports 8 packages (graph) and is imported by 5 packages. Updated 2019-05-03. Refresh now. Tools for package owners.