commonpb

package
v0.0.0-...-ef52421 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: MIT Imports: 5 Imported by: 6

Documentation

Overview

Package commonpb is a generated protocol buffer package.

It is generated from these files:

commonpb/raft.proto

It has these top-level messages:

Entry
Snapshot
ReconfRequest
ReconfResponse

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRaft   = fmt.Errorf("proto: integer overflow")
)
View Source
var EntryType_name = map[int32]string{
	0: "EntryInternal",
	1: "EntryNormal",
	2: "EntryReconf",
}
View Source
var EntryType_value = map[string]int32{
	"EntryInternal": 0,
	"EntryNormal":   1,
	"EntryReconf":   2,
}
View Source
var ReconfStatus_name = map[int32]string{
	0: "ReconfOK",
	1: "ReconfTimeout",
	2: "ReconfNotLeader",
}
View Source
var ReconfStatus_value = map[string]int32{
	"ReconfOK":        0,
	"ReconfTimeout":   1,
	"ReconfNotLeader": 2,
}
View Source
var ReconfType_name = map[int32]string{
	0: "ReconfAdd",
	1: "ReconfRemove",
}
View Source
var ReconfType_value = map[string]int32{
	"ReconfAdd":    0,
	"ReconfRemove": 1,
}

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Term      uint64    `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	Index     uint64    `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	EntryType EntryType `protobuf:"varint,3,opt,name=entryType,proto3,enum=commonpb.EntryType" json:"entryType,omitempty"`
	Data      []byte    `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
}

func (*Entry) Descriptor

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

func (*Entry) Marshal

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

func (*Entry) MarshalTo

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

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) Size

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

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal

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

type EntryType

type EntryType int32
const (
	EntryInternal EntryType = 0
	EntryNormal   EntryType = 1
	EntryReconf   EntryType = 2
)

func (EntryType) EnumDescriptor

func (EntryType) EnumDescriptor() ([]byte, []int)

func (EntryType) String

func (x EntryType) String() string

type ReconfRequest

type ReconfRequest struct {
	ServerID   uint64     `protobuf:"varint,1,opt,name=serverID,proto3" json:"serverID,omitempty"`
	ReconfType ReconfType `protobuf:"varint,2,opt,name=reconfType,proto3,enum=commonpb.ReconfType" json:"reconfType,omitempty"`
}

func (*ReconfRequest) Descriptor

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

func (*ReconfRequest) Marshal

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

func (*ReconfRequest) MarshalTo

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

func (*ReconfRequest) ProtoMessage

func (*ReconfRequest) ProtoMessage()

func (*ReconfRequest) Reset

func (m *ReconfRequest) Reset()

func (*ReconfRequest) Size

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

func (*ReconfRequest) String

func (m *ReconfRequest) String() string

func (*ReconfRequest) Unmarshal

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

type ReconfResponse

type ReconfResponse struct {
	Status     ReconfStatus `protobuf:"varint,1,opt,name=status,proto3,enum=commonpb.ReconfStatus" json:"status,omitempty"`
	LeaderHint string       `protobuf:"bytes,2,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"`
}

func (*ReconfResponse) Descriptor

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

func (*ReconfResponse) Marshal

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

func (*ReconfResponse) MarshalTo

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

func (*ReconfResponse) ProtoMessage

func (*ReconfResponse) ProtoMessage()

func (*ReconfResponse) Reset

func (m *ReconfResponse) Reset()

func (*ReconfResponse) Size

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

func (*ReconfResponse) String

func (m *ReconfResponse) String() string

func (*ReconfResponse) Unmarshal

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

type ReconfStatus

type ReconfStatus int32
const (
	ReconfOK        ReconfStatus = 0
	ReconfTimeout   ReconfStatus = 1
	ReconfNotLeader ReconfStatus = 2
)

func (ReconfStatus) EnumDescriptor

func (ReconfStatus) EnumDescriptor() ([]byte, []int)

func (ReconfStatus) String

func (x ReconfStatus) String() string

type ReconfType

type ReconfType int32
const (
	ReconfAdd    ReconfType = 0
	ReconfRemove ReconfType = 1
)

func (ReconfType) EnumDescriptor

func (ReconfType) EnumDescriptor() ([]byte, []int)

func (ReconfType) String

func (x ReconfType) String() string

type Snapshot

type Snapshot struct {
	LeaderID          uint64 `protobuf:"varint,1,opt,name=leaderID,proto3" json:"leaderID,omitempty"`
	Term              uint64 `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	LastIncludedIndex uint64 `protobuf:"varint,3,opt,name=lastIncludedIndex,proto3" json:"lastIncludedIndex,omitempty"`
	LastIncludedTerm  uint64 `protobuf:"varint,4,opt,name=lastIncludedTerm,proto3" json:"lastIncludedTerm,omitempty"`
	Data              []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
}

func (*Snapshot) Descriptor

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

func (*Snapshot) Marshal

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

func (*Snapshot) MarshalTo

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

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset

func (m *Snapshot) Reset()

func (*Snapshot) Size

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

func (*Snapshot) String

func (m *Snapshot) String() string

func (*Snapshot) Unmarshal

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

Jump to

Keyboard shortcuts

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