Versions in this module Expand all Collapse all v1 v1.8.9 May 29, 2021 v1.8.2 May 28, 2021 Changes in this version + var ErrIntOverflowKv = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling") + type Client struct + func NewClient(kv *KV, codec codec.Codec) (*Client, error) + func (c *Client) CAS(ctx context.Context, key string, ...) error + func (c *Client) Delete(ctx context.Context, key string) error + func (c *Client) Get(ctx context.Context, key string) (interface{}, error) + func (c *Client) List(ctx context.Context, prefix string) ([]string, error) + func (c *Client) WatchKey(ctx context.Context, key string, f func(interface{}) bool) + func (c *Client) WatchPrefix(ctx context.Context, prefix string, f func(string, interface{}) bool) + type KV struct + func NewKV(cfg KVConfig, logger log.Logger) *KV + func (m *KV) CAS(ctx context.Context, key string, codec codec.Codec, ...) error + func (m *KV) Collect(ch chan<- prometheus.Metric) + func (m *KV) Describe(ch chan<- *prometheus.Desc) + func (m *KV) Get(key string, codec codec.Codec) (interface{}, error) + func (m *KV) GetBroadcasts(overhead, limit int) [][]byte + func (m *KV) GetCodec(codecID string) codec.Codec + func (m *KV) GetListeningPort() int + func (m *KV) JoinMembers(members []string) (int, error) + func (m *KV) List(prefix string) []string + func (m *KV) LocalState(join bool) []byte + func (m *KV) MergeRemoteState(data []byte, join bool) + func (m *KV) NodeMeta(limit int) []byte + func (m *KV) NotifyMsg(msg []byte) + func (m *KV) WatchKey(ctx context.Context, key string, codec codec.Codec, f func(interface{}) bool) + func (m *KV) WatchPrefix(ctx context.Context, prefix string, codec codec.Codec, ...) + type KVConfig struct + AbortIfJoinFails bool + Codecs []codec.Codec + DeadNodeReclaimTime time.Duration + GossipInterval time.Duration + GossipNodes int + GossipToTheDeadTime time.Duration + JoinMembers flagext.StringSlice + LeaveTimeout time.Duration + LeftIngestersTimeout time.Duration + MaxJoinBackoff time.Duration + MaxJoinRetries int + MessageHistoryBufferBytes int + MetricsNamespace string + MetricsRegisterer prometheus.Registerer + MinJoinBackoff time.Duration + NodeName string + PushPullInterval time.Duration + RandomizeNodeName bool + RejoinInterval time.Duration + RetransmitMult int + StreamTimeout time.Duration + TCPTransport TCPTransportConfig + func (cfg *KVConfig) RegisterFlags(f *flag.FlagSet, prefix string) + type KVInitService struct + func NewKVInitService(cfg *KVConfig, logger log.Logger) *KVInitService + func (kvs *KVInitService) GetMemberlistKV() (*KV, error) + func (kvs *KVInitService) ServeHTTP(w http.ResponseWriter, req *http.Request) + type KeyValuePair struct + Codec string + Key string + Value []byte + func (*KeyValuePair) Descriptor() ([]byte, []int) + func (*KeyValuePair) ProtoMessage() + func (m *KeyValuePair) GetCodec() string + func (m *KeyValuePair) GetKey() string + func (m *KeyValuePair) GetValue() []byte + func (m *KeyValuePair) Marshal() (dAtA []byte, err error) + func (m *KeyValuePair) MarshalTo(dAtA []byte) (int, error) + func (m *KeyValuePair) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *KeyValuePair) Reset() + func (m *KeyValuePair) Size() (n int) + func (m *KeyValuePair) Unmarshal(dAtA []byte) error + func (m *KeyValuePair) XXX_DiscardUnknown() + func (m *KeyValuePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *KeyValuePair) XXX_Merge(src proto.Message) + func (m *KeyValuePair) XXX_Size() int + func (m *KeyValuePair) XXX_Unmarshal(b []byte) error + func (this *KeyValuePair) Equal(that interface{}) bool + func (this *KeyValuePair) GoString() string + func (this *KeyValuePair) String() string + type KeyValueStore struct + Pairs []*KeyValuePair + func (*KeyValueStore) Descriptor() ([]byte, []int) + func (*KeyValueStore) ProtoMessage() + func (m *KeyValueStore) GetPairs() []*KeyValuePair + func (m *KeyValueStore) Marshal() (dAtA []byte, err error) + func (m *KeyValueStore) MarshalTo(dAtA []byte) (int, error) + func (m *KeyValueStore) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *KeyValueStore) Reset() + func (m *KeyValueStore) Size() (n int) + func (m *KeyValueStore) Unmarshal(dAtA []byte) error + func (m *KeyValueStore) XXX_DiscardUnknown() + func (m *KeyValueStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *KeyValueStore) XXX_Merge(src proto.Message) + func (m *KeyValueStore) XXX_Size() int + func (m *KeyValueStore) XXX_Unmarshal(b []byte) error + func (this *KeyValueStore) Equal(that interface{}) bool + func (this *KeyValueStore) GoString() string + func (this *KeyValueStore) String() string + type Mergeable interface + Merge func(other Mergeable, localCAS bool) (change Mergeable, error error) + MergeContent func() []string + RemoveTombstones func(limit time.Time) + type TCPTransport struct + func NewTCPTransport(config TCPTransportConfig, logger log.Logger) (*TCPTransport, error) + func (t *TCPTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) + func (t *TCPTransport) FinalAdvertiseAddr(ip string, port int) (net.IP, int, error) + func (t *TCPTransport) GetAutoBindPort() int + func (t *TCPTransport) PacketCh() <-chan *memberlist.Packet + func (t *TCPTransport) Shutdown() error + func (t *TCPTransport) StreamCh() <-chan net.Conn + func (t *TCPTransport) WriteTo(b []byte, addr string) (time.Time, error) + type TCPTransportConfig struct + BindAddrs flagext.StringSlice + BindPort int + MetricsNamespace string + MetricsRegisterer prometheus.Registerer + PacketDialTimeout time.Duration + PacketWriteTimeout time.Duration + TLS tlsutil.ClientConfig + TLSEnabled bool + TransportDebug bool + func (cfg *TCPTransportConfig) RegisterFlags(f *flag.FlagSet, prefix string)