twemproxy

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthPoolName    string = "health"
	HealthBindAddress string = "127.0.0.1:22333"
)
View Source
const (
	TwemproxyConfigFile = "/etc/twemproxy/nutcracker.yml"
)

Variables

This section is empty.

Functions

func AddTwemproxySidecar

func AddTwemproxySidecar(podTemplateSpec corev1.PodTemplateSpec, twemproxySpec *saasv1alpha1.TwemproxySpec) corev1.PodTemplateSpec

func AddTwemproxyTaskSidecar

func AddTwemproxyTaskSidecar(taskSpec pipelinev1beta1.TaskSpec, twemproxySpec *saasv1alpha1.TwemproxySpec) pipelinev1beta1.TaskSpec

func NewOptions added in v0.22.0

func NewOptions(spec saasv1alpha1.TwemproxySpec) *pod.Options

NewOptions generates the configuration for the Twemproxy sidecar

func TwemproxyContainer

func TwemproxyContainer(twemproxySpec *saasv1alpha1.TwemproxySpec) corev1.Container

func TwemproxyContainerVolume

func TwemproxyContainerVolume(twemproxySpec *saasv1alpha1.TwemproxySpec) corev1.Volume

Types

type Server

type Server struct {
	Address  string
	Priority int
	Name     string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(hostport string, alias string) Server

func (*Server) Alias

func (srv *Server) Alias() string

func (*Server) MarshalJSON

func (srv *Server) MarshalJSON() ([]byte, error)

func (*Server) UnmarshalJSON

func (srv *Server) UnmarshalJSON(data []byte) error

type ServerPoolConfig

type ServerPoolConfig struct {
	Listen             string   `json:"listen"`
	Hash               string   `json:"hash,omitempty"`
	HashTag            string   `json:"hash_tag,omitempty"`
	Distribution       string   `json:"distribution,omitempty"`
	Timeout            int      `json:"timeout,omitempty"`
	Backlog            int      `json:"backlog,omitempty"`
	PreConnect         bool     `json:"preconnect"`
	Redis              bool     `json:"redis"`
	AutoEjectHosts     bool     `json:"auto_eject_hosts"`
	ServerFailureLimit int      `json:"server_failure_limit,omitempty"`
	Servers            []Server `json:"servers"`
}

func GenerateServerPool

func GenerateServerPool(pool saasv1alpha1.TwemproxyServerPool, targets map[string]Server) ServerPoolConfig

Jump to

Keyboard shortcuts

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