Documentation ¶
Index ¶
- func GetConsulAddress() string
- func IsInsideDockerContainer() bool
- func SetConsulFinderToDefault()
- type Client
- func (c *Client) Close()
- func (c *Client) GetAddress(service string) string
- func (c *Client) GetAddressWithTag(service string, tag string) string
- func (c *Client) GetAllAddress(service string) []string
- func (c *Client) GetAllAddressWithTag(service string, tag string) []string
- func (c *Client) RegisterService(serviceName string, address string) error
- func (c *Client) RegisterServiceWithTag(serviceName string, address string, tag string) error
- func (c *Client) RegisterServiceWithTags(serviceName string, address string, tags []string) error
- type DirectFinder
- func (df *DirectFinder) Close()
- func (df *DirectFinder) GetAddress(service string) string
- func (df *DirectFinder) GetAddressWithTag(service string, tag string) string
- func (df *DirectFinder) GetAllAddress(service string) []string
- func (df *DirectFinder) GetAllAddressWithTag(service string, tag string) []string
- func (df *DirectFinder) RegisterService(service string, address string) error
- func (df *DirectFinder) RegisterServiceWithTag(service string, address string, tag string) error
- func (df *DirectFinder) RegisterServiceWithTags(service string, address string, tags []string) error
- type RegisteredService
- type Service
- type ServiceFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConsulAddress ¶
func GetConsulAddress() string
func IsInsideDockerContainer ¶
func IsInsideDockerContainer() bool
func SetConsulFinderToDefault ¶
func SetConsulFinderToDefault()
Types ¶
type Client ¶
func GetConsulClient ¶
func GetConsulClient() *Client
func (*Client) GetAddress ¶
func (*Client) GetAddressWithTag ¶
func (*Client) GetAllAddress ¶
func (*Client) GetAllAddressWithTag ¶
func (*Client) RegisterService ¶
func (*Client) RegisterServiceWithTag ¶
type DirectFinder ¶
type DirectFinder struct{}
func NewDirectFinder ¶
func NewDirectFinder() *DirectFinder
func (*DirectFinder) Close ¶
func (df *DirectFinder) Close()
func (*DirectFinder) GetAddress ¶
func (df *DirectFinder) GetAddress(service string) string
func (*DirectFinder) GetAddressWithTag ¶
func (df *DirectFinder) GetAddressWithTag(service string, tag string) string
func (*DirectFinder) GetAllAddress ¶
func (df *DirectFinder) GetAllAddress(service string) []string
func (*DirectFinder) GetAllAddressWithTag ¶
func (df *DirectFinder) GetAllAddressWithTag(service string, tag string) []string
func (*DirectFinder) RegisterService ¶
func (df *DirectFinder) RegisterService(service string, address string) error
func (*DirectFinder) RegisterServiceWithTag ¶
func (df *DirectFinder) RegisterServiceWithTag(service string, address string, tag string) error
func (*DirectFinder) RegisterServiceWithTags ¶
func (df *DirectFinder) RegisterServiceWithTags(service string, address string, tags []string) error
type RegisteredService ¶
type ServiceFinder ¶
type ServiceFinder interface { GetAddress(service string) string GetAllAddress(service string) []string GetAddressWithTag(service, tag string) string GetAllAddressWithTag(service, tag string) []string RegisterService(service, address string) error RegisterServiceWithTag(service, address, tag string) error RegisterServiceWithTags(service, address string, tags []string) error Close() }
func GetConsulServiceFinder ¶
func GetConsulServiceFinder() ServiceFinder
func GetServiceFinder ¶
func GetServiceFinder() ServiceFinder
Click to show internal directories.
Click to hide internal directories.