client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialOptionsFromConfig

func DialOptionsFromConfig(cfg *atlas.Config) ([]grpc.DialOption, error)

DialOptionsFromConfig returns dial options configured from a Stellar config

Types

type Client

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

Client is the Atlas client

func NewClient

func NewClient(addr string, opts ...grpc.DialOption) (*Client, error)

NewClient returns a new Atlas client configured with the specified address and options

func (*Client) Close

func (c *Client) Close() error

Close closes the underlying GRPC client

func (*Client) Conn

func (c *Client) Conn() *grpc.ClientConn

Conn returns the current configured client connection

func (*Client) Create

func (c *Client) Create(name string, records []*api.Record) error

Create is used to create new records

func (*Client) Delete

func (c *Client) Delete(name string) error

Delete removes records from the datastore

func (*Client) Export

func (c *Client) Export() ([]byte, error)

Export exports all records from Atlas

func (*Client) List

func (c *Client) List() ([]*api.Record, error)

List returns all records in the datastore

func (*Client) Lookup

func (c *Client) Lookup(query string) ([]*api.Record, error)

Lookup performs a lookup for the specified record

func (*Client) RecordType

func (c *Client) RecordType(rtype string) (api.RecordType, error)

RecordType is a helper function to resolve the record type from a human friendly string

Jump to

Keyboard shortcuts

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