Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func GetEnvVarOrDefault(key string, defaultValue string) 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 Api
- type ApiClient
- func (apiClient *ApiClient) Create(newApi *ApiRequest) (*Api, error)
- func (apiClient *ApiClient) DeleteById(id string) error
- func (apiClient *ApiClient) DeleteByName(name string) error
- func (apiClient *ApiClient) GetById(id string) (*Api, error)
- func (apiClient *ApiClient) GetByName(name string) (*Api, error)
- func (apiClient *ApiClient) List() (*Apis, error)
- func (apiClient *ApiClient) ListFiltered(filter *ApiFilter) (*Apis, error)
- func (apiClient *ApiClient) UpdateById(id string, apiRequest *ApiRequest) (*Api, error)
- func (apiClient *ApiClient) UpdateByName(name string, apiRequest *ApiRequest) (*Api, error)
- type ApiFilter
- type ApiRequest
- type Apis
- 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) ListFiltered(filter *ConsumerFilter) (*Consumers, error)
- func (consumerClient *ConsumerClient) ListPluginConfig(consumerId string, pluginName string) (*ConsumerPluginConfigs, error)
- func (consumerClient *ConsumerClient) UpdateById(id string, consumerRequest *ConsumerRequest) (*Consumer, error)
- func (consumerClient *ConsumerClient) UpdateByUsername(username string, consumerRequest *ConsumerRequest) (*Consumer, error)
- type ConsumerFilter
- type ConsumerPluginConfig
- type ConsumerPluginConfigs
- type ConsumerRequest
- type Consumers
- type KongAdminClient
- func (kongAdminClient *KongAdminClient) Apis() *ApiClient
- 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) 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) GetById(id string) (*Plugin, error)
- func (pluginClient *PluginClient) List() (*Plugins, error)
- func (pluginClient *PluginClient) ListFiltered(filter *PluginFilter) (*Plugins, error)
- func (pluginClient *PluginClient) UpdateById(id string, pluginRequest *PluginRequest) (*Plugin, error)
- type PluginFilter
- type PluginRequest
- type Plugins
- type Route
- type RouteClient
- func (routeClient *RouteClient) AddRoute(routeRequest *RouteRequest) (*Route, error)
- func (routeClient *RouteClient) DeleteRoute(id string) error
- func (routeClient *RouteClient) GetRoute(id string) (*Route, error)
- func (routeClient *RouteClient) GetRoutes(query *RouteQueryString) ([]*Route, error)
- func (routeClient *RouteClient) GetRoutesFromServiceId(id string) ([]*Route, error)
- func (routeClient *RouteClient) GetRoutesFromServiceName(name string) ([]*Route, error)
- func (routeClient *RouteClient) UpdateRoute(id string, routeRequest *RouteRequest) (*Route, error)
- type RouteQueryString
- type RouteRequest
- type RouteServiceObject
- type Routes
- type Service
- type ServiceClient
- func (serviceClient *ServiceClient) AddService(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 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) ListFiltered(filter *UpstreamFilter) (*Upstreams, error)
- func (upstreamClient *UpstreamClient) UpdateById(id string, upstreamRequest *UpstreamRequest) (*Upstream, error)
- func (upstreamClient *UpstreamClient) UpdateByName(name string, upstreamRequest *UpstreamRequest) (*Upstream, error)
- type UpstreamFilter
- type UpstreamHealthCheck
- type UpstreamHealthCheckActive
- type UpstreamHealthCheckPassive
- type UpstreamRequest
- type Upstreams
Constants ¶
View Source
const ApisPath = "/apis/"
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 EnvKongApiHostAddress = "KONG_API_ADDR"
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 UpstreamsPath = "/upstreams/"
Variables ¶
This section is empty.
Functions ¶
func GetEnvVarOrDefault ¶
func StringSlice ¶ added in v1.0.0
func StringValueSlice ¶ added in v1.0.0
Types ¶
type ActiveHealthy ¶
type ActiveUnhealthy ¶
type Api ¶
type Api struct { Id *string `json:"id"` CreatedAt *int `json:"created_at"` Name *string `json:"name"` Hosts []*string `json:"hosts,omitempty"` Uris []*string `json:"uris,omitempty"` Methods []*string `json:"methods,omitempty"` UpstreamUrl *string `json:"upstream_url"` StripUri *bool `json:"strip_uri,omitempty"` PreserveHost *bool `json:"preserve_host,omitempty"` Retries *int `json:"retries,omitempty"` UpstreamConnectTimeout *int `json:"upstream_connect_timeout,omitempty"` UpstreamSendTimeout *int `json:"upstream_send_timeout,omitempty"` UpstreamReadTimeout *int `json:"upstream_read_timeout,omitempty"` HttpsOnly *bool `json:"https_only,omitempty"` HttpIfTerminated *bool `json:"http_if_terminated,omitempty"` }
func (*Api) UnmarshalJSON ¶ added in v1.7.0
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func (*ApiClient) DeleteById ¶
func (*ApiClient) DeleteByName ¶
func (*ApiClient) ListFiltered ¶
func (*ApiClient) UpdateById ¶
func (apiClient *ApiClient) UpdateById(id string, apiRequest *ApiRequest) (*Api, error)
func (*ApiClient) UpdateByName ¶
func (apiClient *ApiClient) UpdateByName(name string, apiRequest *ApiRequest) (*Api, error)
type ApiRequest ¶
type ApiRequest struct { Name *string `json:"name"` Hosts []*string `json:"hosts"` Uris []*string `json:"uris"` Methods []*string `json:"methods"` UpstreamUrl *string `json:"upstream_url"` StripUri *bool `json:"strip_uri,omitempty"` PreserveHost *bool `json:"preserve_host,omitempty"` Retries *int `json:"retries,omitempty"` UpstreamConnectTimeout *int `json:"upstream_connect_timeout,omitempty"` UpstreamSendTimeout *int `json:"upstream_send_timeout,omitempty"` UpstreamReadTimeout *int `json:"upstream_read_timeout,omitempty"` HttpsOnly *bool `json:"https_only,omitempty"` HttpIfTerminated *bool `json:"http_if_terminated,omitempty"` }
func (*ApiRequest) MarshalJSON ¶ added in v1.7.0
func (a *ApiRequest) MarshalJSON() ([]byte, error)
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"` Total int `json:"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) ListFiltered ¶
func (consumerClient *ConsumerClient) ListFiltered(filter *ConsumerFilter) (*Consumers, error)
func (*ConsumerClient) ListPluginConfig ¶ added in v1.9.1
func (consumerClient *ConsumerClient) ListPluginConfig(consumerId string, pluginName string) (*ConsumerPluginConfigs, 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 ConsumerFilter ¶
type ConsumerPluginConfig ¶
func (*ConsumerPluginConfig) UnmarshalJSON ¶ added in v1.9.1
func (c *ConsumerPluginConfig) UnmarshalJSON(data []byte) error
type ConsumerPluginConfigs ¶ added in v1.9.1
type ConsumerPluginConfigs struct { Results []*ConsumerPluginConfig `json:"data,omitempty"` Total int `json:"total,omitempty"` Next string `json:"next,omitempty"` }
type ConsumerRequest ¶
type KongAdminClient ¶
type KongAdminClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *Config) *KongAdminClient
func (*KongAdminClient) Apis ¶
func (kongAdminClient *KongAdminClient) Apis() *ApiClient
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) Upstreams ¶
func (kongAdminClient *KongAdminClient) Upstreams() *UpstreamClient
type PassiveHealthy ¶
type PassiveUnhealthy ¶
type Plugin ¶
type Plugin struct { Id string `json:"id"` Name string `json:"name"` ApiId string `json:"api_id,omitempty"` ConsumerId string `json:"consumer_id,omitempty"` ServiceId string `json:"service_id,omitempty"` RouteId string `json:"route_id,omitempty"` Config map[string]interface{} `json:"config,omitempty"` Enabled bool `json:"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) GetById ¶
func (pluginClient *PluginClient) GetById(id string) (*Plugin, error)
func (*PluginClient) List ¶
func (pluginClient *PluginClient) List() (*Plugins, error)
func (*PluginClient) ListFiltered ¶
func (pluginClient *PluginClient) ListFiltered(filter *PluginFilter) (*Plugins, error)
func (*PluginClient) UpdateById ¶
func (pluginClient *PluginClient) UpdateById(id string, pluginRequest *PluginRequest) (*Plugin, error)
type PluginFilter ¶
type PluginFilter struct { Id string `url:"id,omitempty"` Name string `url:"name,omitempty"` ApiId string `url:"api_id,omitempty"` ConsumerId string `url:"consumer_id,omitempty"` ServiceId string `url:"service_id,omitempty"` RouteId string `url:"route_id,omitempty"` Size int `url:"size,omitempty"` Offset int `url:"offset,omitempty"` }
type PluginRequest ¶
type Route ¶
type Route struct { Id *string `json:"id"` CreatedAt *int `json:"created_at"` UpdatedAt *int `json:"updated_at"` Protocols []*string `json:"protocols"` Methods []*string `json:"methods"` Hosts []*string `json:"hosts"` Paths []*string `json:"paths"` RegexPriority *int `json:"regex_priority"` StripPath *bool `json:"strip_path"` PreserveHost *bool `json:"preserve_host"` Service *RouteServiceObject `json:"service"` }
type RouteClient ¶
type RouteClient struct {
// contains filtered or unexported fields
}
func (*RouteClient) AddRoute ¶
func (routeClient *RouteClient) AddRoute(routeRequest *RouteRequest) (*Route, error)
func (*RouteClient) DeleteRoute ¶
func (routeClient *RouteClient) DeleteRoute(id string) error
func (*RouteClient) GetRoutes ¶
func (routeClient *RouteClient) GetRoutes(query *RouteQueryString) ([]*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) UpdateRoute ¶
func (routeClient *RouteClient) UpdateRoute(id string, routeRequest *RouteRequest) (*Route, error)
type RouteQueryString ¶
type RouteRequest ¶
type RouteServiceObject ¶
type RouteServiceObject struct {
Id string `json:"id"`
}
type Service ¶
type Service struct { Id *string `json:"id"` CreatedAt *int `json:"created_at"` UpdatedAt *int `json:"updated_at"` Protocol *string `json:"protocol"` Host *string `json:"host"` Port *int `json:"port"` Path *string `json:"path"` Name *string `json:"name"` Retries *int `json:"retries"` ConnectTimeout *int `json:"connect_timeout"` WriteTimeout *int `json:"write_timeout"` ReadTimeout *int `json:"read_timeout"` }
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
func (*ServiceClient) AddService ¶
func (serviceClient *ServiceClient) AddService(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"` Protocol *string `json:"protocol"` Host *string `json:"host"` Port *int `json:"port,omitempty"` Path *string `json:"path,omitempty"` Retries *int `json:"retries,omitempty"` ConnectTimeout *int `json:"connect_timeout,omitempty"` WriteTimeout *int `json:"write_timeout,omitempty"` ReadTimeout *int `json:"read_timeout,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"` Database databaseStatus `json:"database"` }
type StatusClient ¶
type StatusClient struct {
// contains filtered or unexported fields
}
func (*StatusClient) Get ¶
func (statusClient *StatusClient) Get() (*Status, error)
type Upstream ¶
type Upstream struct { Id string `json:"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) ListFiltered ¶
func (upstreamClient *UpstreamClient) ListFiltered(filter *UpstreamFilter) (*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 UpstreamFilter ¶
type UpstreamHealthCheck ¶
type UpstreamHealthCheck struct { Active *UpstreamHealthCheckActive `json:"active,omitempty"` Passive *UpstreamHealthCheckPassive `json:"passive,omitempty"` }
type UpstreamHealthCheckActive ¶
type UpstreamHealthCheckActive struct { Concurrency int `json:"concurrency,omitempty"` Healthy *ActiveHealthy `json:"healthy,omitempty"` HttpPath string `json:"http_path,omitempty"` Timeout int `json:"timeout,omitempty"` Unhealthy *ActiveUnhealthy `json:"unhealthy,omitempty"` }
type UpstreamHealthCheckPassive ¶
type UpstreamHealthCheckPassive struct { Healthy *PassiveHealthy `json:"healthy,omitempty"` Unhealthy *PassiveUnhealthy `json:"unhealthy,omitempty"` }
type UpstreamRequest ¶
type UpstreamRequest struct { Name string `json:"name"` Slots int `json:"slots,omitempty"` HashOn string `json:"hash_on,omitempty"` HashFallback string `json:"hash_fallback,omitempty"` HashOnHeader string `json:"hash_on_header,omitempty"` HashFallbackHeader string `json:"hash_fallback_header,omitempty"` HealthChecks *UpstreamHealthCheck `json:"healthchecks,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.