raftpb

package
v0.0.0-...-975194c Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRaftServer

func RegisterRaftServer(s *grpc.Server, srv RaftServer)

Types

type Add

type Add struct {
	// id of file to add
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// id of parent file
	ParentId uint64 `protobuf:"varint,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	// file name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// file mode (store.FileMode)
	Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
	// if the add is a hard link or genuinely new file
	IsHardLink           bool     `protobuf:"varint,5,opt,name=is_hard_link,json=isHardLink,proto3" json:"is_hard_link,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Add) Descriptor

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

func (*Add) GetId

func (m *Add) GetId() uint64
func (m *Add) GetIsHardLink() bool

func (*Add) GetMode

func (m *Add) GetMode() uint32

func (*Add) GetName

func (m *Add) GetName() string

func (*Add) GetParentId

func (m *Add) GetParentId() uint64

func (*Add) ProtoMessage

func (*Add) ProtoMessage()

func (*Add) Reset

func (m *Add) Reset()

func (*Add) String

func (m *Add) String() string

func (*Add) XXX_DiscardUnknown

func (m *Add) XXX_DiscardUnknown()

func (*Add) XXX_Marshal

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

func (*Add) XXX_Merge

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

func (*Add) XXX_Size

func (m *Add) XXX_Size() int

func (*Add) XXX_Unmarshal

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

type Change

type Change struct {
	// id of the file that was changed
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// new version of the file
	Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// where the change starts (unused for now)
	Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// size of the change
	Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// raft id of the peer who has the latest file
	PeerId               uint64   `protobuf:"varint,5,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Change) Descriptor

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

func (*Change) GetId

func (m *Change) GetId() uint64

func (*Change) GetOffset

func (m *Change) GetOffset() uint64

func (*Change) GetPeerId

func (m *Change) GetPeerId() uint64

func (*Change) GetSize

func (m *Change) GetSize() int64

func (*Change) GetVersion

func (m *Change) GetVersion() uint64

func (*Change) ProtoMessage

func (*Change) ProtoMessage()

func (*Change) Reset

func (m *Change) Reset()

func (*Change) String

func (m *Change) String() string

func (*Change) XXX_DiscardUnknown

func (m *Change) XXX_DiscardUnknown()

func (*Change) XXX_Marshal

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

func (*Change) XXX_Merge

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

func (*Change) XXX_Size

func (m *Change) XXX_Size() int

func (*Change) XXX_Unmarshal

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

type Delete

type Delete struct {
	// id of the file to delete
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// id of the file's parent
	ParentId uint64 `protobuf:"varint,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	// name of the file
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Delete) Descriptor

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

func (*Delete) GetId

func (m *Delete) GetId() uint64

func (*Delete) GetName

func (m *Delete) GetName() string

func (*Delete) GetParentId

func (m *Delete) GetParentId() uint64

func (*Delete) ProtoMessage

func (*Delete) ProtoMessage()

func (*Delete) Reset

func (m *Delete) Reset()

func (*Delete) String

func (m *Delete) String() string

func (*Delete) XXX_DiscardUnknown

func (m *Delete) XXX_DiscardUnknown()

func (*Delete) XXX_Marshal

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

func (*Delete) XXX_Merge

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

func (*Delete) XXX_Size

func (m *Delete) XXX_Size() int

func (*Delete) XXX_Unmarshal

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

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

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

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

type Entry

type Entry struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are valid to be assigned to Message:
	//	*Entry_Rename
	//	*Entry_Delete
	//	*Entry_Change
	//	*Entry_Add
	Message              isEntry_Message `protobuf_oneof:"message"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Entry) Descriptor

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

func (*Entry) GetAdd

func (m *Entry) GetAdd() *Add

func (*Entry) GetChange

func (m *Entry) GetChange() *Change

func (*Entry) GetDelete

func (m *Entry) GetDelete() *Delete

func (*Entry) GetId

func (m *Entry) GetId() uint64

func (*Entry) GetMessage

func (m *Entry) GetMessage() isEntry_Message

func (*Entry) GetRename

func (m *Entry) GetRename() *Rename

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

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

func (*Entry) XXX_Merge

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

func (*Entry) XXX_OneofWrappers

func (*Entry) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

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

type Entry_Add

type Entry_Add struct {
	Add *Add `protobuf:"bytes,5,opt,name=add,proto3,oneof"`
}

type Entry_Change

type Entry_Change struct {
	Change *Change `protobuf:"bytes,4,opt,name=change,proto3,oneof"`
}

type Entry_Delete

type Entry_Delete struct {
	Delete *Delete `protobuf:"bytes,3,opt,name=delete,proto3,oneof"`
}

type Entry_Rename

type Entry_Rename struct {
	Rename *Rename `protobuf:"bytes,2,opt,name=rename,proto3,oneof"`
}

type RaftClient

type RaftClient interface {
	Step(ctx context.Context, in *raftpb.Message, opts ...grpc.CallOption) (*Empty, error)
}

RaftClient is the client API for Raft service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRaftClient

func NewRaftClient(cc *grpc.ClientConn) RaftClient

type RaftServer

type RaftServer interface {
	Step(context.Context, *raftpb.Message) (*Empty, error)
}

RaftServer is the server API for Raft service.

type Rename

type Rename struct {
	// id of the renamed file
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// the id of the old parent of the file
	OldParentId uint64 `protobuf:"varint,2,opt,name=old_parent_id,json=oldParentId,proto3" json:"old_parent_id,omitempty"`
	// the id of the new parent of the file
	NewParentId uint64 `protobuf:"varint,3,opt,name=new_parent_id,json=newParentId,proto3" json:"new_parent_id,omitempty"`
	// the new name of the file
	NewName string `protobuf:"bytes,4,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"`
	// old name
	OldName              string   `protobuf:"bytes,5,opt,name=old_name,json=oldName,proto3" json:"old_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Rename) Descriptor

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

func (*Rename) GetId

func (m *Rename) GetId() uint64

func (*Rename) GetNewName

func (m *Rename) GetNewName() string

func (*Rename) GetNewParentId

func (m *Rename) GetNewParentId() uint64

func (*Rename) GetOldName

func (m *Rename) GetOldName() string

func (*Rename) GetOldParentId

func (m *Rename) GetOldParentId() uint64

func (*Rename) ProtoMessage

func (*Rename) ProtoMessage()

func (*Rename) Reset

func (m *Rename) Reset()

func (*Rename) String

func (m *Rename) String() string

func (*Rename) XXX_DiscardUnknown

func (m *Rename) XXX_DiscardUnknown()

func (*Rename) XXX_Marshal

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

func (*Rename) XXX_Merge

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

func (*Rename) XXX_Size

func (m *Rename) XXX_Size() int

func (*Rename) XXX_Unmarshal

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

type UnimplementedRaftServer

type UnimplementedRaftServer struct {
}

UnimplementedRaftServer can be embedded to have forward compatible implementations.

func (*UnimplementedRaftServer) Step

Jump to

Keyboard shortcuts

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