Documentation ¶
Index ¶
- Constants
- Variables
- type AuthMethod
- type ClientAuthentication
- type ClientConfig
- type Connection
- func (c *Connection) Client() *api.Client
- func (c *Connection) GetKeyValue(ctx context.Context, path string) (value []byte, err error)
- func (c *Connection) ListKeyValuePairs(ctx context.Context, path string) (results map[string]interface{}, err error)
- func (c *Connection) SetKeyValue(ctx context.Context, path string, value []byte) error
- type ConnectionProperties
- type KubernetesClient
- type KubernetesConfig
- type Options
- type SSLProperties
- type TokenClientAuthentication
Constants ¶
View Source
const ( Token = AuthMethod("token") Kubernetes = AuthMethod("kubernetes") )
View Source
const (
PropertyPrefix = "cloud.consul"
)
Variables ¶
View Source
var (
ErrNoInstances = errors.New("no matching service instances found")
)
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
type AuthMethod string
func (*AuthMethod) UnmarshalText ¶
func (a *AuthMethod) UnmarshalText(data []byte) error
UnmarshalText encoding.TextUnmarshaler
type ClientAuthentication ¶
ClientAuthentication TODO review ClientAuthentication and KubernetesClient
type ClientConfig ¶
type ClientConfig struct { *api.Config Properties *ConnectionProperties ClientAuth ClientAuthentication }
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Options) (*Connection, error)
func (*Connection) Client ¶
func (c *Connection) Client() *api.Client
func (*Connection) GetKeyValue ¶
func (*Connection) ListKeyValuePairs ¶
func (*Connection) SetKeyValue ¶
type ConnectionProperties ¶
type ConnectionProperties struct { Host string `json:"host"` Port int `json:"port"` Scheme string `json:"scheme"` SSL SSLProperties `json:"ssl"` Authentication AuthMethod `json:"authentication"` Kubernetes KubernetesConfig `json:"kubernetes"` Token string `json:"token"` }
func (ConnectionProperties) Address ¶
func (c ConnectionProperties) Address() string
type KubernetesClient ¶
type KubernetesClient struct {
// contains filtered or unexported fields
}
func TokenKubernetesAuthentication ¶
func TokenKubernetesAuthentication(kubernetesConfig KubernetesConfig) *KubernetesClient
type KubernetesConfig ¶
type Options ¶
type Options func(cfg *ClientConfig) error
func WithProperties ¶
func WithProperties(p ConnectionProperties) Options
type SSLProperties ¶
type TokenClientAuthentication ¶
type TokenClientAuthentication string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.