consul

package
v0.0.0-...-1a196e1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// 將此服務註冊到本地特工(Agent)。
	Register(r *api.AgentServiceRegistration) error

	// 將此服務從本地特工中移除。
	Deregister(r *api.AgentServiceRegistration) error

	// Service
	Service(service, tag string, passingOnly bool, queryOpts *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, error)

	// 回傳一個最底層的 Consul 客戶端。
	Client() *api.Client
}

Client 包裹了一個 Consul API。

func NewClient

func NewClient(conf *api.Config) (Client, error)

NewClient 會回傳一個實作 Client 介面的建構體, 這個建構體包裹了 Consul 客戶端。

Jump to

Keyboard shortcuts

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