client

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_SYNCHRONIZING = "SYNCHRONIZING"
	STATUS_PENDING       = "PENDING"
	STATUS_OK            = "OK"
	STATUS_DELETED       = "DELETED"
)

Variables

This section is empty.

Functions

func DoLimited

func DoLimited(ctx context.Context, limit, n int, fn func(i int) error) error

func IsErrExists

func IsErrExists(err error) bool

Types

type BackendPoolHealthCheck

type BackendPoolHealthCheck struct {
	HcPath           string `json:"hc_path,omitempty"`
	HcBody           string `json:"hc_body,omitempty"`
	HcHTTPStatusCode string `json:"hc_http_status_code,omitempty"`
}

type ErrAmbiguousSearch

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

func (ErrAmbiguousSearch) Error

func (e ErrAmbiguousSearch) Error() string

type ErrItemAlreadyExists

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

func (ErrItemAlreadyExists) Error

func (e ErrItemAlreadyExists) Error() string

type ErrItemNotFound

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

func (ErrItemNotFound) Error

func (e ErrItemNotFound) Error() string

type GalebClient

type GalebClient struct {
	ApiURL        string
	Username      string
	Password      string
	TokenHeader   string
	Environment   string
	Project       string
	BalancePolicy string
	RuleType      string
	WaitTimeout   time.Duration
	UseToken      bool
	Debug         bool
	MaxRequests   int
	// contains filtered or unexported fields
}

func (*GalebClient) AddBackendPool

func (c *GalebClient) AddBackendPool(name string, wait bool) (string, error)

func (*GalebClient) AddBackends

func (c *GalebClient) AddBackends(backends []*url.URL, poolName string, wait bool) error

func (*GalebClient) AddRuleToPool

func (c *GalebClient) AddRuleToPool(name, poolName string) (string, error)

func (*GalebClient) AddVirtualHost

func (c *GalebClient) AddVirtualHost(addr string, wait bool) (string, error)

func (*GalebClient) AddVirtualHostWithGroup

func (c *GalebClient) AddVirtualHostWithGroup(addr string, virtualHostWithGroup string, wait bool) (string, error)

func (*GalebClient) FindTargetsByPool

func (c *GalebClient) FindTargetsByPool(poolName string) ([]Target, error)

func (*GalebClient) FindVirtualHostGroupByVirtualHostId

func (c *GalebClient) FindVirtualHostGroupByVirtualHostId(virtualHostId string) (int, error)

func (*GalebClient) FindVirtualHostsByGroup

func (c *GalebClient) FindVirtualHostsByGroup(virtualHostName string) ([]VirtualHost, error)

func (*GalebClient) Healthcheck

func (c *GalebClient) Healthcheck() error

func (*GalebClient) RemoveBackendPool

func (c *GalebClient) RemoveBackendPool(poolName string) error

func (*GalebClient) RemoveResourceByID

func (c *GalebClient) RemoveResourceByID(resourceID string) error

func (*GalebClient) RemoveResourcesByIDs

func (c *GalebClient) RemoveResourcesByIDs(resourceIDs []string, wait bool) error

func (*GalebClient) RemoveRule

func (c *GalebClient) RemoveRule(ruleName string) error

func (*GalebClient) RemoveRulesOrderedByRule

func (c *GalebClient) RemoveRulesOrderedByRule(ruleName string) error

func (*GalebClient) RemoveVirtualHost

func (c *GalebClient) RemoveVirtualHost(virtualHostName string) error

func (*GalebClient) SetRuleVirtualHost

func (c *GalebClient) SetRuleVirtualHost(ruleName, virtualHostName string, wait bool) error

func (*GalebClient) UpdatePoolProperties

func (c *GalebClient) UpdatePoolProperties(poolName string, properties BackendPoolHealthCheck) error

func (*GalebClient) UpdateVirtualHostWithGroup

func (c *GalebClient) UpdateVirtualHostWithGroup(addr string, virtualHostWithGroup string) error

type Pool

type Pool struct {
	Project       string `json:"project"`
	Environment   string `json:"environment"`
	BalancePolicy string `json:"balancepolicy"`
	BackendPoolHealthCheck
	// contains filtered or unexported fields
}

func (Pool) FullId

func (c Pool) FullId() string

func (Pool) GetName

func (c Pool) GetName() string

type Rule

type Rule struct {
	BackendPool []string `json:"pools,omitempty"`
	Matching    string   `json:"matching,omitempty"`
	Project     string   `json:"project"`
	// contains filtered or unexported fields
}

func (Rule) FullId

func (c Rule) FullId() string

func (Rule) GetName

func (c Rule) GetName() string

type RuleOrdered

type RuleOrdered struct {
	VirtualHostGroup string `json:"virtualhostgroup"`
	Environment      string `json:"environment"`
	Rule             string `json:"rule"`
	Order            int    `json:"order"`
	// contains filtered or unexported fields
}

func (RuleOrdered) FullId

func (c RuleOrdered) FullId() string

func (RuleOrdered) GetName

func (c RuleOrdered) GetName() string

type RuleProperties

type RuleProperties struct {
	Match string `json:"match"`
}

type Target

type Target struct {
	BackendPool string `json:"pool,omitempty"`
	// contains filtered or unexported fields
}

func (Target) FullId

func (c Target) FullId() string

func (Target) GetName

func (c Target) GetName() string

type VirtualHost

type VirtualHost struct {
	Environment      []string `json:"environments,omitempty"`
	Project          string   `json:"project,omitempty"`
	VirtualHostGroup string   `json:"virtualhostgroup,omitempty"`
	// contains filtered or unexported fields
}

func (VirtualHost) FullId

func (c VirtualHost) FullId() string

func (VirtualHost) GetName

func (c VirtualHost) GetName() string

type VirtualHostGroup

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

func (VirtualHostGroup) FullId

func (c VirtualHostGroup) FullId() string

func (VirtualHostGroup) GetName

func (c VirtualHostGroup) GetName() string

Jump to

Keyboard shortcuts

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