Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func GetEnvVarOrDefault(key string, defaultValue string) string
- func IdToString(v *Id) string
- func Int(v int) *int
- func String(v string) *string
- func StringSlice(src []string) []*string
- func StringValueSlice(src []*string) []string
- type ActiveHealthy
- type ActiveUnhealthy
- type Certificate
- type CertificateClient
- func (certificateClient *CertificateClient) Create(certificateRequest *CertificateRequest) (*Certificate, error)
- func (certificateClient *CertificateClient) DeleteById(id string) error
- func (certificateClient *CertificateClient) GetById(id string) (*Certificate, error)
- func (certificateClient *CertificateClient) List() (*Certificates, error)
- func (certificateClient *CertificateClient) UpdateById(id string, certificateRequest *CertificateRequest) (*Certificate, error)
- type CertificateRequest
- type Certificates
- type Config
- type Consumer
- type ConsumerClient
- func (consumerClient *ConsumerClient) Create(consumerRequest *ConsumerRequest) (*Consumer, error)
- func (consumerClient *ConsumerClient) CreatePluginConfig(consumerId string, pluginName string, pluginConfig string) (*ConsumerPluginConfig, error)
- func (consumerClient *ConsumerClient) DeleteById(id string) error
- func (consumerClient *ConsumerClient) DeleteByUsername(username string) error
- func (consumerClient *ConsumerClient) DeletePluginConfig(consumerId string, pluginName string, id string) error
- func (consumerClient *ConsumerClient) GetById(id string) (*Consumer, error)
- func (consumerClient *ConsumerClient) GetByUsername(username string) (*Consumer, error)
- func (consumerClient *ConsumerClient) GetPluginConfig(consumerId string, pluginName string, id string) (*ConsumerPluginConfig, error)
- func (consumerClient *ConsumerClient) List() (*Consumers, error)
- func (consumerClient *ConsumerClient) UpdateById(id string, consumerRequest *ConsumerRequest) (*Consumer, error)
- func (consumerClient *ConsumerClient) UpdateByUsername(username string, consumerRequest *ConsumerRequest) (*Consumer, error)
- type ConsumerPluginConfig
- type ConsumerRequest
- type Consumers
- type Id
- type IpPort
- type KongAdminClient
- func (kongAdminClient *KongAdminClient) Certificates() *CertificateClient
- func (kongAdminClient *KongAdminClient) Consumers() *ConsumerClient
- func (kongAdminClient *KongAdminClient) Plugins() *PluginClient
- func (kongAdminClient *KongAdminClient) Routes() *RouteClient
- func (kongAdminClient *KongAdminClient) Services() *ServiceClient
- func (kongAdminClient *KongAdminClient) Snis() *SnisClient
- func (kongAdminClient *KongAdminClient) Status() *StatusClient
- func (kongAdminClient *KongAdminClient) Targets() *TargetClient
- func (kongAdminClient *KongAdminClient) Upstreams() *UpstreamClient
- type PassiveHealthy
- type PassiveUnhealthy
- type Plugin
- type PluginClient
- func (pluginClient *PluginClient) Create(pluginRequest *PluginRequest) (*Plugin, error)
- func (pluginClient *PluginClient) DeleteById(id string) error
- func (pluginClient *PluginClient) GetByConsumerId(id string) (*Plugins, error)
- func (pluginClient *PluginClient) GetById(id string) (*Plugin, error)
- func (pluginClient *PluginClient) GetByRouteId(id string) (*Plugins, error)
- func (pluginClient *PluginClient) GetByServiceId(id string) (*Plugins, error)
- func (pluginClient *PluginClient) List(query *PluginQueryString) ([]*Plugin, error)
- func (pluginClient *PluginClient) UpdateById(id string, pluginRequest *PluginRequest) (*Plugin, error)
- type PluginQueryString
- type PluginRequest
- type Plugins
- type Route
- type RouteClient
- func (routeClient *RouteClient) Create(routeRequest *RouteRequest) (*Route, error)
- func (routeClient *RouteClient) DeleteById(id string) error
- func (routeClient *RouteClient) DeleteByName(name string) error
- func (routeClient *RouteClient) GetById(id string) (*Route, error)
- func (routeClient *RouteClient) GetByName(name string) (*Route, error)
- func (routeClient *RouteClient) GetRoutesFromServiceId(id string) ([]*Route, error)
- func (routeClient *RouteClient) GetRoutesFromServiceName(name string) ([]*Route, error)
- func (routeClient *RouteClient) List(query *RouteQueryString) ([]*Route, error)
- func (routeClient *RouteClient) UpdateById(id string, routeRequest *RouteRequest) (*Route, error)
- func (routeClient *RouteClient) UpdateByName(name string, routeRequest *RouteRequest) (*Route, error)
- type RouteQueryString
- type RouteRequest
- type Routes
- type Service
- type ServiceClient
- func (serviceClient *ServiceClient) Create(serviceRequest *ServiceRequest) (*Service, error)
- func (serviceClient *ServiceClient) DeleteServiceById(id string) error
- func (serviceClient *ServiceClient) DeleteServiceByName(name string) error
- func (serviceClient *ServiceClient) GetServiceById(id string) (*Service, error)
- func (serviceClient *ServiceClient) GetServiceByName(name string) (*Service, error)
- func (serviceClient *ServiceClient) GetServiceFromRouteId(id string) (*Service, error)
- func (serviceClient *ServiceClient) GetServices(query *ServiceQueryString) ([]*Service, error)
- func (serviceClient *ServiceClient) UpdateServiceById(id string, serviceRequest *ServiceRequest) (*Service, error)
- func (serviceClient *ServiceClient) UpdateServiceByName(name string, serviceRequest *ServiceRequest) (*Service, error)
- func (serviceClient *ServiceClient) UpdateServicebyRouteId(id string, serviceRequest *ServiceRequest) (*Service, error)
- type ServiceQueryString
- type ServiceRequest
- type Services
- type Sni
- type Snis
- type SnisClient
- func (snisClient *SnisClient) Create(snisRequest *SnisRequest) (*Sni, error)
- func (snisClient *SnisClient) DeleteByName(name string) error
- func (snisClient *SnisClient) GetByName(name string) (*Sni, error)
- func (snisClient *SnisClient) List() (*Snis, error)
- func (snisClient *SnisClient) UpdateByName(name string, snisRequest *SnisRequest) (*Sni, error)
- type SnisRequest
- type Status
- type StatusClient
- type Target
- type TargetClient
- func (targetClient *TargetClient) CreateFromUpstreamId(id string, targetRequest *TargetRequest) (*Target, error)
- func (targetClient *TargetClient) CreateFromUpstreamName(name string, targetRequest *TargetRequest) (*Target, error)
- func (targetClient *TargetClient) DeleteFromUpstreamByHostPort(upstreamNameOrId string, hostPort string) error
- func (targetClient *TargetClient) DeleteFromUpstreamById(upstreamNameOrId string, id string) error
- func (targetClient *TargetClient) GetTargetsFromUpstreamId(id string) ([]*Target, error)
- func (targetClient *TargetClient) GetTargetsFromUpstreamName(name string) ([]*Target, error)
- func (targetClient *TargetClient) GetTargetsWithHealthFromUpstreamId(id string) ([]*Target, error)
- func (targetClient *TargetClient) GetTargetsWithHealthFromUpstreamName(name string) ([]*Target, error)
- func (targetClient *TargetClient) SetTargetFromUpstreamByHostPortAsHealthy(upstreamNameOrId string, hostPort string) error
- func (targetClient *TargetClient) SetTargetFromUpstreamByHostPortAsUnhealthy(upstreamNameOrId string, hostPort string) error
- func (targetClient *TargetClient) SetTargetFromUpstreamByIdAsHealthy(upstreamNameOrId string, id string) error
- func (targetClient *TargetClient) SetTargetFromUpstreamByIdAsUnhealthy(upstreamNameOrId string, id string) error
- type TargetRequest
- type Targets
- type Upstream
- type UpstreamClient
- func (upstreamClient *UpstreamClient) Create(upstreamRequest *UpstreamRequest) (*Upstream, error)
- func (upstreamClient *UpstreamClient) DeleteById(id string) error
- func (upstreamClient *UpstreamClient) DeleteByName(name string) error
- func (upstreamClient *UpstreamClient) GetById(id string) (*Upstream, error)
- func (upstreamClient *UpstreamClient) GetByName(name string) (*Upstream, error)
- func (upstreamClient *UpstreamClient) List() (*Upstreams, error)
- func (upstreamClient *UpstreamClient) UpdateById(id string, upstreamRequest *UpstreamRequest) (*Upstream, error)
- func (upstreamClient *UpstreamClient) UpdateByName(name string, upstreamRequest *UpstreamRequest) (*Upstream, error)
- type UpstreamHealthCheck
- type UpstreamHealthCheckActive
- type UpstreamHealthCheckPassive
- type UpstreamRequest
- type Upstreams
Constants ¶
View Source
const CertificatesPath = "/certificates/"
View Source
const ConsumersPath = "/consumers/"
View Source
const EnvKongAdminHostAddress = "KONG_ADMIN_ADDR"
View Source
const EnvKongAdminPassword = "KONG_ADMIN_PASSWORD"
View Source
const EnvKongAdminToken = "KONG_ADMIN_TOKEN"
View Source
const EnvKongAdminUsername = "KONG_ADMIN_USERNAME"
View Source
const EnvKongApiKey = "KONG_API_KEY"
View Source
const EnvKongTLSSkipVerify = "TLS_SKIP_VERIFY"
View Source
const PluginsPath = "/plugins/"
View Source
const RoutesPath = "/routes/"
View Source
const ServicesPath = "/services/"
View Source
const SnisPath = "/snis/"
View Source
const TargetsPath = "/upstreams/%s/targets"
View Source
const UpstreamsPath = "/upstreams/"
Variables ¶
This section is empty.
Functions ¶
func GetEnvVarOrDefault ¶
func IdToString ¶
func StringSlice ¶ added in v1.0.0
func StringValueSlice ¶ added in v1.0.0
Types ¶
type ActiveHealthy ¶
type ActiveUnhealthy ¶
type ActiveUnhealthy struct { HttpFailures int `json:"http_failures" yaml:"http_failures"` HttpStatuses []int `json:"http_statuses,omitempty" yaml:"http_statuses,omitempty"` Interval int `json:"interval" yaml:"interval"` TcpFailures int `json:"tcp_failures" yaml:"tcp_failures"` Timeouts int `json:"timeouts" yaml:"timeouts"` }
type Certificate ¶
type CertificateClient ¶
type CertificateClient struct {
// contains filtered or unexported fields
}
func (*CertificateClient) Create ¶
func (certificateClient *CertificateClient) Create(certificateRequest *CertificateRequest) (*Certificate, error)
func (*CertificateClient) DeleteById ¶
func (certificateClient *CertificateClient) DeleteById(id string) error
func (*CertificateClient) GetById ¶
func (certificateClient *CertificateClient) GetById(id string) (*Certificate, error)
func (*CertificateClient) List ¶
func (certificateClient *CertificateClient) List() (*Certificates, error)
func (*CertificateClient) UpdateById ¶
func (certificateClient *CertificateClient) UpdateById(id string, certificateRequest *CertificateRequest) (*Certificate, error)
type CertificateRequest ¶
type Certificates ¶
type Certificates struct { Results []*Certificate `json:"data,omitempty" yaml:"data,omitempty"` Total int `json:"total,omitempty" yaml:"total,omitempty"` }
type Config ¶
type Config struct { HostAddress string Username string Password string InsecureSkipVerify bool ApiKey string AdminToken string }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type ConsumerClient ¶
type ConsumerClient struct {
// contains filtered or unexported fields
}
func (*ConsumerClient) Create ¶
func (consumerClient *ConsumerClient) Create(consumerRequest *ConsumerRequest) (*Consumer, error)
func (*ConsumerClient) CreatePluginConfig ¶
func (consumerClient *ConsumerClient) CreatePluginConfig(consumerId string, pluginName string, pluginConfig string) (*ConsumerPluginConfig, error)
func (*ConsumerClient) DeleteById ¶
func (consumerClient *ConsumerClient) DeleteById(id string) error
func (*ConsumerClient) DeleteByUsername ¶
func (consumerClient *ConsumerClient) DeleteByUsername(username string) error
func (*ConsumerClient) DeletePluginConfig ¶
func (consumerClient *ConsumerClient) DeletePluginConfig(consumerId string, pluginName string, id string) error
func (*ConsumerClient) GetById ¶
func (consumerClient *ConsumerClient) GetById(id string) (*Consumer, error)
func (*ConsumerClient) GetByUsername ¶
func (consumerClient *ConsumerClient) GetByUsername(username string) (*Consumer, error)
func (*ConsumerClient) GetPluginConfig ¶
func (consumerClient *ConsumerClient) GetPluginConfig(consumerId string, pluginName string, id string) (*ConsumerPluginConfig, error)
func (*ConsumerClient) List ¶
func (consumerClient *ConsumerClient) List() (*Consumers, error)
func (*ConsumerClient) UpdateById ¶
func (consumerClient *ConsumerClient) UpdateById(id string, consumerRequest *ConsumerRequest) (*Consumer, error)
func (*ConsumerClient) UpdateByUsername ¶
func (consumerClient *ConsumerClient) UpdateByUsername(username string, consumerRequest *ConsumerRequest) (*Consumer, error)
type ConsumerPluginConfig ¶
type ConsumerRequest ¶
type IpPort ¶
func IpPortSliceSlice ¶
type KongAdminClient ¶
type KongAdminClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *Config) *KongAdminClient
func (*KongAdminClient) Certificates ¶
func (kongAdminClient *KongAdminClient) Certificates() *CertificateClient
func (*KongAdminClient) Consumers ¶
func (kongAdminClient *KongAdminClient) Consumers() *ConsumerClient
func (*KongAdminClient) Plugins ¶
func (kongAdminClient *KongAdminClient) Plugins() *PluginClient
func (*KongAdminClient) Routes ¶
func (kongAdminClient *KongAdminClient) Routes() *RouteClient
func (*KongAdminClient) Services ¶
func (kongAdminClient *KongAdminClient) Services() *ServiceClient
func (*KongAdminClient) Snis ¶
func (kongAdminClient *KongAdminClient) Snis() *SnisClient
func (*KongAdminClient) Status ¶
func (kongAdminClient *KongAdminClient) Status() *StatusClient
func (*KongAdminClient) Targets ¶ added in v1.10.0
func (kongAdminClient *KongAdminClient) Targets() *TargetClient
func (*KongAdminClient) Upstreams ¶
func (kongAdminClient *KongAdminClient) Upstreams() *UpstreamClient
type PassiveHealthy ¶
type PassiveUnhealthy ¶
type Plugin ¶
type Plugin struct { Id string `json:"id" yaml:"id"` Name string `json:"name" yaml:"name"` ConsumerId *Id `json:"consumer,omitempty" yaml:"consumer,omitempty"` ServiceId *Id `json:"service,omitempty" yaml:"service,omitempty"` RouteId *Id `json:"route,omitempty" yaml:"route,omitempty"` RunOn string `json:"run_on,omitempty" yaml:"run_on,omitempty"` Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"` Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` }
type PluginClient ¶
type PluginClient struct {
// contains filtered or unexported fields
}
func (*PluginClient) Create ¶
func (pluginClient *PluginClient) Create(pluginRequest *PluginRequest) (*Plugin, error)
func (*PluginClient) DeleteById ¶
func (pluginClient *PluginClient) DeleteById(id string) error
func (*PluginClient) GetByConsumerId ¶
func (pluginClient *PluginClient) GetByConsumerId(id string) (*Plugins, error)
func (*PluginClient) GetById ¶
func (pluginClient *PluginClient) GetById(id string) (*Plugin, error)
func (*PluginClient) GetByRouteId ¶
func (pluginClient *PluginClient) GetByRouteId(id string) (*Plugins, error)
func (*PluginClient) GetByServiceId ¶
func (pluginClient *PluginClient) GetByServiceId(id string) (*Plugins, error)
func (*PluginClient) List ¶
func (pluginClient *PluginClient) List(query *PluginQueryString) ([]*Plugin, error)
func (*PluginClient) UpdateById ¶
func (pluginClient *PluginClient) UpdateById(id string, pluginRequest *PluginRequest) (*Plugin, error)
type PluginQueryString ¶
type PluginRequest ¶
type PluginRequest struct { Name string `json:"name" yaml:"name"` ConsumerId *Id `json:"consumer" yaml:"consumer"` ServiceId *Id `json:"service" yaml:"service"` RouteId *Id `json:"route" yaml:"route"` RunOn string `json:"run_on,omitempty" yaml:"run_on,omitempty"` Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"` Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` }
type Route ¶
type Route struct { Id *string `json:"id" yaml:"id"` Name *string `json:"name" yaml:"name"` CreatedAt *int `json:"created_at" yaml:"created_at"` UpdatedAt *int `json:"updated_at" yaml:"updated_at"` Protocols []*string `json:"protocols" yaml:"protocols"` Methods []*string `json:"methods" yaml:"methods"` Hosts []*string `json:"hosts" yaml:"hosts"` Paths []*string `json:"paths" yaml:"paths"` RegexPriority *int `json:"regex_priority" yaml:"regex_priority"` StripPath *bool `json:"strip_path" yaml:"strip_path"` PreserveHost *bool `json:"preserve_host" yaml:"preserve_host"` Snis []*string `json:"snis" yaml:"snis"` Sources []*IpPort `json:"sources" yaml:"sources"` Destinations []*IpPort `json:"destinations" yaml:"destinations"` Service *Id `json:"service" yaml:"service"` }
type RouteClient ¶
type RouteClient struct {
// contains filtered or unexported fields
}
func (*RouteClient) Create ¶
func (routeClient *RouteClient) Create(routeRequest *RouteRequest) (*Route, error)
func (*RouteClient) DeleteById ¶
func (routeClient *RouteClient) DeleteById(id string) error
func (*RouteClient) DeleteByName ¶
func (routeClient *RouteClient) DeleteByName(name string) error
func (*RouteClient) GetByName ¶
func (routeClient *RouteClient) GetByName(name string) (*Route, error)
func (*RouteClient) GetRoutesFromServiceId ¶
func (routeClient *RouteClient) GetRoutesFromServiceId(id string) ([]*Route, error)
func (*RouteClient) GetRoutesFromServiceName ¶
func (routeClient *RouteClient) GetRoutesFromServiceName(name string) ([]*Route, error)
func (*RouteClient) List ¶
func (routeClient *RouteClient) List(query *RouteQueryString) ([]*Route, error)
func (*RouteClient) UpdateById ¶
func (routeClient *RouteClient) UpdateById(id string, routeRequest *RouteRequest) (*Route, error)
func (*RouteClient) UpdateByName ¶
func (routeClient *RouteClient) UpdateByName(name string, routeRequest *RouteRequest) (*Route, error)
type RouteQueryString ¶
type RouteRequest ¶
type RouteRequest struct { Name *string `json:"name" yaml:"name"` Protocols []*string `json:"protocols" yaml:"protocols"` Methods []*string `json:"methods" yaml:"methods"` Hosts []*string `json:"hosts" yaml:"hosts"` Paths []*string `json:"paths" yaml:"paths"` RegexPriority *int `json:"regex_priority" yaml:"regex_priority"` StripPath *bool `json:"strip_path" yaml:"strip_path"` PreserveHost *bool `json:"preserve_host" yaml:"preserve_host"` Snis []*string `json:"snis" yaml:"snis"` Sources []*IpPort `json:"sources" yaml:"sources"` Destinations []*IpPort `json:"destinations" yaml:"destinations"` Service *Id `json:"service" yaml:"service"` }
type Service ¶
type Service struct { Id *string `json:"id" yaml:"id"` CreatedAt *int `json:"created_at" yaml:"created_at"` UpdatedAt *int `json:"updated_at" yaml:"updated_at"` Protocol *string `json:"protocol" yaml:"protocol"` Host *string `json:"host" yaml:"host"` Port *int `json:"port" yaml:"port"` Path *string `json:"path" yaml:"path"` Name *string `json:"name" yaml:"name"` Retries *int `json:"retries" yaml:"retries"` ConnectTimeout *int `json:"connect_timeout" yaml:"connect_timeout"` WriteTimeout *int `json:"write_timeout" yaml:"write_timeout"` ReadTimeout *int `json:"read_timeout" yaml:"read_timeout"` Url *string `json:"url" yaml:"url"` }
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
func (*ServiceClient) Create ¶
func (serviceClient *ServiceClient) Create(serviceRequest *ServiceRequest) (*Service, error)
func (*ServiceClient) DeleteServiceById ¶
func (serviceClient *ServiceClient) DeleteServiceById(id string) error
func (*ServiceClient) DeleteServiceByName ¶
func (serviceClient *ServiceClient) DeleteServiceByName(name string) error
func (*ServiceClient) GetServiceById ¶
func (serviceClient *ServiceClient) GetServiceById(id string) (*Service, error)
func (*ServiceClient) GetServiceByName ¶
func (serviceClient *ServiceClient) GetServiceByName(name string) (*Service, error)
func (*ServiceClient) GetServiceFromRouteId ¶
func (serviceClient *ServiceClient) GetServiceFromRouteId(id string) (*Service, error)
func (*ServiceClient) GetServices ¶
func (serviceClient *ServiceClient) GetServices(query *ServiceQueryString) ([]*Service, error)
func (*ServiceClient) UpdateServiceById ¶
func (serviceClient *ServiceClient) UpdateServiceById(id string, serviceRequest *ServiceRequest) (*Service, error)
func (*ServiceClient) UpdateServiceByName ¶
func (serviceClient *ServiceClient) UpdateServiceByName(name string, serviceRequest *ServiceRequest) (*Service, error)
func (*ServiceClient) UpdateServicebyRouteId ¶
func (serviceClient *ServiceClient) UpdateServicebyRouteId(id string, serviceRequest *ServiceRequest) (*Service, error)
type ServiceQueryString ¶
type ServiceRequest ¶
type ServiceRequest struct { Name *string `json:"name" yaml:"name"` Protocol *string `json:"protocol" yaml:"protocol"` Host *string `json:"host" yaml:"host"` Port *int `json:"port,omitempty" yaml:"port,omitempty"` Path *string `json:"path,omitempty" yaml:"path,omitempty"` Retries *int `json:"retries,omitempty" yaml:"retries,omitempty"` ConnectTimeout *int `json:"connect_timeout,omitempty" yaml:"connect_timeout,omitempty"` WriteTimeout *int `json:"write_timeout,omitempty" yaml:"write_timeout,omitempty"` ReadTimeout *int `json:"read_timeout,omitempty" yaml:"read_timeout,omitempty"` Url *string `json:"url,omitempty" yaml:"url,omitempty"` }
type SnisClient ¶
type SnisClient struct {
// contains filtered or unexported fields
}
func (*SnisClient) Create ¶
func (snisClient *SnisClient) Create(snisRequest *SnisRequest) (*Sni, error)
func (*SnisClient) DeleteByName ¶
func (snisClient *SnisClient) DeleteByName(name string) error
func (*SnisClient) List ¶
func (snisClient *SnisClient) List() (*Snis, error)
func (*SnisClient) UpdateByName ¶
func (snisClient *SnisClient) UpdateByName(name string, snisRequest *SnisRequest) (*Sni, error)
type SnisRequest ¶
type Status ¶
type Status struct { Server serverStatus `json:"server" yaml:"server"` Database databaseStatus `json:"database" yaml:"database"` }
type StatusClient ¶
type StatusClient struct {
// contains filtered or unexported fields
}
func (*StatusClient) Get ¶
func (statusClient *StatusClient) Get() (*Status, error)
type Target ¶ added in v1.10.0
type Target struct { Id *string `json:"id,omitempty" yaml:"id,omitempty"` CreatedAt *float32 `json:"created_at" yaml:"created_at"` Target *string `json:"target" yaml:"target"` Weight *int `json:"weight" yaml:"weight"` Upstream *Id `json:"upstream" yaml:"upstream"` Health *string `json:"health" yaml:"health"` }
type TargetClient ¶ added in v1.10.0
type TargetClient struct {
// contains filtered or unexported fields
}
func (*TargetClient) CreateFromUpstreamId ¶ added in v1.10.0
func (targetClient *TargetClient) CreateFromUpstreamId(id string, targetRequest *TargetRequest) (*Target, error)
func (*TargetClient) CreateFromUpstreamName ¶ added in v1.10.0
func (targetClient *TargetClient) CreateFromUpstreamName(name string, targetRequest *TargetRequest) (*Target, error)
func (*TargetClient) DeleteFromUpstreamByHostPort ¶ added in v1.10.0
func (targetClient *TargetClient) DeleteFromUpstreamByHostPort(upstreamNameOrId string, hostPort string) error
func (*TargetClient) DeleteFromUpstreamById ¶ added in v1.10.0
func (targetClient *TargetClient) DeleteFromUpstreamById(upstreamNameOrId string, id string) error
func (*TargetClient) GetTargetsFromUpstreamId ¶ added in v1.10.0
func (targetClient *TargetClient) GetTargetsFromUpstreamId(id string) ([]*Target, error)
func (*TargetClient) GetTargetsFromUpstreamName ¶ added in v1.10.0
func (targetClient *TargetClient) GetTargetsFromUpstreamName(name string) ([]*Target, error)
func (*TargetClient) GetTargetsWithHealthFromUpstreamId ¶ added in v1.10.0
func (targetClient *TargetClient) GetTargetsWithHealthFromUpstreamId(id string) ([]*Target, error)
func (*TargetClient) GetTargetsWithHealthFromUpstreamName ¶ added in v1.10.0
func (targetClient *TargetClient) GetTargetsWithHealthFromUpstreamName(name string) ([]*Target, error)
func (*TargetClient) SetTargetFromUpstreamByHostPortAsHealthy ¶ added in v1.10.0
func (targetClient *TargetClient) SetTargetFromUpstreamByHostPortAsHealthy(upstreamNameOrId string, hostPort string) error
func (*TargetClient) SetTargetFromUpstreamByHostPortAsUnhealthy ¶ added in v1.10.0
func (targetClient *TargetClient) SetTargetFromUpstreamByHostPortAsUnhealthy(upstreamNameOrId string, hostPort string) error
func (*TargetClient) SetTargetFromUpstreamByIdAsHealthy ¶ added in v1.10.0
func (targetClient *TargetClient) SetTargetFromUpstreamByIdAsHealthy(upstreamNameOrId string, id string) error
func (*TargetClient) SetTargetFromUpstreamByIdAsUnhealthy ¶ added in v1.10.0
func (targetClient *TargetClient) SetTargetFromUpstreamByIdAsUnhealthy(upstreamNameOrId string, id string) error
type TargetRequest ¶ added in v1.10.0
type Upstream ¶
type Upstream struct { Id string `json:"id,omitempty" yaml:"id,omitempty"` UpstreamRequest }
type UpstreamClient ¶
type UpstreamClient struct {
// contains filtered or unexported fields
}
func (*UpstreamClient) Create ¶
func (upstreamClient *UpstreamClient) Create(upstreamRequest *UpstreamRequest) (*Upstream, error)
func (*UpstreamClient) DeleteById ¶
func (upstreamClient *UpstreamClient) DeleteById(id string) error
func (*UpstreamClient) DeleteByName ¶
func (upstreamClient *UpstreamClient) DeleteByName(name string) error
func (*UpstreamClient) GetById ¶
func (upstreamClient *UpstreamClient) GetById(id string) (*Upstream, error)
func (*UpstreamClient) GetByName ¶
func (upstreamClient *UpstreamClient) GetByName(name string) (*Upstream, error)
func (*UpstreamClient) List ¶
func (upstreamClient *UpstreamClient) List() (*Upstreams, error)
func (*UpstreamClient) UpdateById ¶
func (upstreamClient *UpstreamClient) UpdateById(id string, upstreamRequest *UpstreamRequest) (*Upstream, error)
func (*UpstreamClient) UpdateByName ¶
func (upstreamClient *UpstreamClient) UpdateByName(name string, upstreamRequest *UpstreamRequest) (*Upstream, error)
type UpstreamHealthCheck ¶
type UpstreamHealthCheck struct { Active *UpstreamHealthCheckActive `json:"active,omitempty" yaml:"active,omitempty"` Passive *UpstreamHealthCheckPassive `json:"passive,omitempty" yaml:"passive,omitempty"` }
type UpstreamHealthCheckActive ¶
type UpstreamHealthCheckActive struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Concurrency int `json:"concurrency,omitempty" yaml:"concurrency,omitempty"` Healthy *ActiveHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"` HttpPath string `json:"http_path,omitempty" yaml:"http_path,omitempty"` HttpsVerifyCertificate bool `json:"https_verify_certificate" yaml:"https_verify_certificate"` HttpsSni *string `json:"https_sni,omitempty" yaml:"https_sni,omitempty"` Timeout int `json:"timeout,omitempty" yaml:"timeout,omitempty"` Unhealthy *ActiveUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"` }
type UpstreamHealthCheckPassive ¶
type UpstreamHealthCheckPassive struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Healthy *PassiveHealthy `json:"healthy,omitempty yaml:"healthy,omitempty"` Unhealthy *PassiveUnhealthy `json:"unhealthy,omitempty yaml:"unhealthy,omitempty"` }
type UpstreamRequest ¶
type UpstreamRequest struct { Name string `json:"name" yaml:"name"` Slots int `json:"slots,omitempty" yaml:"slots,omitempty"` HashOn string `json:"hash_on,omitempty" yaml:"hash_on,omitempty"` HashFallback string `json:"hash_fallback,omitempty" yaml:"hash_fallback,omitempty"` HashOnHeader string `json:"hash_on_header,omitempty" yaml:"hash_on_header,omitempty"` HashFallbackHeader string `json:"hash_fallback_header,omitempty" yaml:"hash_fallback_header,omitempty"` HashOnCookie string `json:"hash_on_cookie,omitempty" yaml:"hash_on_cookie,omitempty"` HashOnCookiePath string `json:"hash_on_cookie_path,omitempty" yaml:"hash_on_cookie_path,omitempty"` HealthChecks *UpstreamHealthCheck `json:"healthchecks,omitempty" yaml:"healthchecks,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.