mesh

package
v1.30.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 52

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMesh        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMesh          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMesh = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type KVState

type KVState struct {
	Records              map[string]*KVStateRecord `` /* 155-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func DecodeKVState

func DecodeKVState(data []byte) (*KVState, error)

func (*KVState) Descriptor

func (*KVState) Descriptor() ([]byte, []int)

func (*KVState) Encode

func (s *KVState) Encode() [][]byte

Encode serializes our complete state to a slice of byte-slices. In this simple example, we use a single gob-encoded buffer: see https://golang.org/pkg/encoding/gob/

func (*KVState) GetRecords

func (m *KVState) GetRecords() map[string]*KVStateRecord

func (*KVState) Marshal

func (m *KVState) Marshal() (dAtA []byte, err error)

func (*KVState) MarshalTo

func (m *KVState) MarshalTo(dAtA []byte) (int, error)

func (*KVState) MarshalToSizedBuffer added in v1.19.0

func (m *KVState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KVState) Merge

func (s *KVState) Merge(other mesh.GossipData) (complete mesh.GossipData)

Merge merges the other GossipData into this one, and returns our resulting, complete state.

func (*KVState) ProtoMessage

func (*KVState) ProtoMessage()

func (*KVState) Reset

func (m *KVState) Reset()

func (*KVState) Size

func (m *KVState) Size() (n int)

func (*KVState) String

func (this *KVState) String() string

func (*KVState) Unmarshal

func (m *KVState) Unmarshal(dAtA []byte) error

func (*KVState) XXX_DiscardUnknown added in v1.19.0

func (m *KVState) XXX_DiscardUnknown()

func (*KVState) XXX_Marshal added in v1.19.0

func (m *KVState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KVState) XXX_Merge added in v1.19.0

func (m *KVState) XXX_Merge(src proto.Message)

func (*KVState) XXX_Size added in v1.19.0

func (m *KVState) XXX_Size() int

func (*KVState) XXX_Unmarshal added in v1.19.0

func (m *KVState) XXX_Unmarshal(b []byte) error

type KVStateRecord

type KVStateRecord struct {
	Data                 []byte   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Tombstone            bool     `protobuf:"varint,2,opt,name=tombstone,proto3" json:"tombstone,omitempty"`
	Version              uint64   `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KVStateRecord) Descriptor

func (*KVStateRecord) Descriptor() ([]byte, []int)

func (*KVStateRecord) GetData added in v1.19.0

func (m *KVStateRecord) GetData() []byte

func (*KVStateRecord) GetTombstone added in v1.19.0

func (m *KVStateRecord) GetTombstone() bool

func (*KVStateRecord) GetVersion added in v1.19.0

func (m *KVStateRecord) GetVersion() uint64

func (*KVStateRecord) Marshal

func (m *KVStateRecord) Marshal() (dAtA []byte, err error)

func (*KVStateRecord) MarshalTo

func (m *KVStateRecord) MarshalTo(dAtA []byte) (int, error)

func (*KVStateRecord) MarshalToSizedBuffer added in v1.19.0

func (m *KVStateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KVStateRecord) ProtoMessage

func (*KVStateRecord) ProtoMessage()

func (*KVStateRecord) Reset

func (m *KVStateRecord) Reset()

func (*KVStateRecord) Size

func (m *KVStateRecord) Size() (n int)

func (*KVStateRecord) String

func (this *KVStateRecord) String() string

func (*KVStateRecord) Unmarshal

func (m *KVStateRecord) Unmarshal(dAtA []byte) error

func (*KVStateRecord) XXX_DiscardUnknown added in v1.19.0

func (m *KVStateRecord) XXX_DiscardUnknown()

func (*KVStateRecord) XXX_Marshal added in v1.19.0

func (m *KVStateRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KVStateRecord) XXX_Merge added in v1.19.0

func (m *KVStateRecord) XXX_Merge(src proto.Message)

func (*KVStateRecord) XXX_Size added in v1.19.0

func (m *KVStateRecord) XXX_Size() int

func (*KVStateRecord) XXX_Unmarshal added in v1.19.0

func (m *KVStateRecord) XXX_Unmarshal(b []byte) error

type MeshGossiper

type MeshGossiper struct {
	// contains filtered or unexported fields
}

func NewMeshGossiper

func NewMeshGossiper(listen string, channelName string, nodeName string, password []byte, seeds gossip.SeedProvider) (*MeshGossiper, error)

func (*MeshGossiper) Snapshot

func (g *MeshGossiper) Snapshot() *gossip.GossipStateSnapshot

func (*MeshGossiper) Start

func (g *MeshGossiper) Start() error

func (*MeshGossiper) UpdateValues

func (g *MeshGossiper) UpdateValues(removeKeys []string, putEntries map[string]string) error

Jump to

Keyboard shortcuts

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