Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
KubernetesNamespace string `json:"namespace,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
}
func CreateConfig ¶
func CreateConfig() *Config
type K8sBalancer ¶ added in v1.2.5
type K8sBalancer struct {
// contains filtered or unexported fields
}
K8sBalancer is the middleware struct
func (*K8sBalancer) ServeHTTP ¶ added in v1.2.5
func (b *K8sBalancer) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP handles the request and selects a pod
type K8sClient ¶ added in v1.2.5
type K8sClient struct {
// contains filtered or unexported fields
}
K8sClient interacts with Kubernetes API using HTTP requests.
func NewK8sClient ¶ added in v1.2.5
NewK8sClient initializes the Kubernetes client, loads initial pod list, and starts watching changes.
func (*K8sClient) GetRandomPod ¶ added in v1.2.5
GetRandomPod returns a random pod IP.
Click to show internal directories.
Click to hide internal directories.