disco

package
v4.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: MIT Imports: 8 Imported by: 10

Documentation

Overview

Package disco controls interaction with the rqlite Discovery service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provides a Discovery Service client.

func New

func New(url string) *Client

New returns an initialized Discovery Service client.

func (*Client) Register

func (c *Client) Register(id, addr string) (*Response, error)

Register attempts to register with the Discovery Service, using the given address.

func (*Client) URL

func (c *Client) URL() string

URL returns the Discovery Service URL used by this client.

type Response

type Response struct {
	CreatedAt string   `json:"created_at"`
	DiscoID   string   `json:"disco_id"`
	Nodes     []string `json:"nodes"`
}

Response represents the response returned by a Discovery Service.

Jump to

Keyboard shortcuts

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