Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProxyConfigMapCreateReason = "MemcachedProxyConfigMapCreated" FailedProxyConfigMapCreateReason = "MemcachedProxyConfigMapCreateError" FailedProxyConfigMapUpdateReason = "MemcachedProxyConfigMapUpdateError" DeleteConfigMapReason = "MemcachedProxyConfigMapDelete" )
Variables ¶
View Source
var (
KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
)
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Cotroller represents a memcached proxy config map controller that watches MemcachedProxy objects and creates a ConfigMap used to configure mcrouter.
func New ¶
func New( name string, client clientset.Interface, ianlewisorgClient ianlewisorgclientset.Interface, namespace string, proxyInformer cache.SharedIndexInformer, configMapInformer cache.SharedIndexInformer, serviceInformer cache.SharedIndexInformer, endpointsInformer cache.SharedIndexInformer, recorder record.EventRecorder, logger *logging.Logger, workers int, ) *Controller
New creates a new memcached proxy configmap controller
type McRouterConfig ¶
type McRouterConfig struct {
Pools map[string]Pool `json:"pools,omitempty"`
Route StringOrRoute `json:"route,omitempty"`
}
McRouterConfig represents JSON configuration for mcrouter.
type OperationPolicies ¶
type OperationPolicies struct {
Add *StringOrRoute `json:"add,omitempty"`
Set *StringOrRoute `json:"set,omitempty"`
Delete *StringOrRoute `json:"delete,omitempty"`
Get *StringOrRoute `json:"empty,omitempty"`
}
OperationPolicies configures operation policies for different actions via mcrouter
type Route ¶
type Route struct {
Type string `json:"type"`
DefaultPolicy *StringOrRoute `json:"default_policy,omitempty"`
OperationPolicies *OperationPolicies `json:"operation_policies,omitempty"`
Children []StringOrRoute `json:"children,omitempty"`
}
Route is the object version of a mcrouter route
type StringOrRoute ¶
StringOrRoute describes an mcrouter route. It can be either an object or a string.
func (StringOrRoute) MarshalJSON ¶
func (r StringOrRoute) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface.
Click to show internal directories.
Click to hide internal directories.