consul

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRancherServices

func ConvertRancherServices(services []metadata.Service) (nodes map[string]*consulapi.CatalogNode)

Types

type Client

type Client struct {
	Client *consulapi.Client
}

Client can be used to query Consul API

func NewClient

func NewClient(URL string, token string) *Client

func (*Client) AgentServices

func (r *Client) AgentServices(environmentUUID string) (services map[string]*consulapi.AgentService, err error)

func (*Client) Node

func (r *Client) Node(node string, q *consulapi.QueryOptions) (n *consulapi.CatalogNode, err error)

func (*Client) Nodes

func (r *Client) Nodes(environmentUUID string, q *consulapi.QueryOptions) (nodes map[string]*consulapi.CatalogNode, err error)

func (*Client) Ping

func (r *Client) Ping() (string, error)

func (*Client) SyncAgentServices

func (r *Client) SyncAgentServices(environmentUUID string, rancherNodes map[string]*consulapi.CatalogNode)

func (*Client) SyncCatalog

func (r *Client) SyncCatalog(nodes map[string]*consulapi.CatalogNode, rancherNodes map[string]*consulapi.CatalogNode)

Jump to

Keyboard shortcuts

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