mesh

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package mesh is a generated protocol buffer package.

It is generated from these files:

k8s.io/kops/protokube/pkg/gossip/mesh/mesh.proto

It has these top-level messages:

KVState
KVStateRecord

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")
)

Functions

This section is empty.

Types

type KVState

type KVState struct {
	Records map[string]*KVStateRecord `` /* 141-byte string literal not displayed */
}

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) 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

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"`
}

func (*KVStateRecord) Descriptor

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

func (*KVStateRecord) Marshal

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

func (*KVStateRecord) MarshalTo

func (m *KVStateRecord) MarshalTo(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

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