Documentation ¶
Index ¶
- func RegisterRaftServer(s *grpc.Server, srv RaftServer)
- type Add
- func (*Add) Descriptor() ([]byte, []int)
- func (m *Add) GetId() uint64
- func (m *Add) GetIsHardLink() bool
- func (m *Add) GetMode() uint32
- func (m *Add) GetName() string
- func (m *Add) GetParentId() uint64
- func (*Add) ProtoMessage()
- func (m *Add) Reset()
- func (m *Add) String() string
- func (m *Add) XXX_DiscardUnknown()
- func (m *Add) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Add) XXX_Merge(src proto.Message)
- func (m *Add) XXX_Size() int
- func (m *Add) XXX_Unmarshal(b []byte) error
- type Change
- func (*Change) Descriptor() ([]byte, []int)
- func (m *Change) GetId() uint64
- func (m *Change) GetOffset() uint64
- func (m *Change) GetPeerId() uint64
- func (m *Change) GetSize() int64
- func (m *Change) GetVersion() uint64
- func (*Change) ProtoMessage()
- func (m *Change) Reset()
- func (m *Change) String() string
- func (m *Change) XXX_DiscardUnknown()
- func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Change) XXX_Merge(src proto.Message)
- func (m *Change) XXX_Size() int
- func (m *Change) XXX_Unmarshal(b []byte) error
- type Delete
- func (*Delete) Descriptor() ([]byte, []int)
- func (m *Delete) GetId() uint64
- func (m *Delete) GetName() string
- func (m *Delete) GetParentId() uint64
- func (*Delete) ProtoMessage()
- func (m *Delete) Reset()
- func (m *Delete) String() string
- func (m *Delete) XXX_DiscardUnknown()
- func (m *Delete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Delete) XXX_Merge(src proto.Message)
- func (m *Delete) XXX_Size() int
- func (m *Delete) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) GetAdd() *Add
- func (m *Entry) GetChange() *Change
- func (m *Entry) GetDelete() *Delete
- func (m *Entry) GetId() uint64
- func (m *Entry) GetMessage() isEntry_Message
- func (m *Entry) GetRename() *Rename
- func (*Entry) ProtoMessage()
- func (m *Entry) Reset()
- func (m *Entry) String() string
- func (m *Entry) XXX_DiscardUnknown()
- func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Entry) XXX_Merge(src proto.Message)
- func (*Entry) XXX_OneofWrappers() []interface{}
- func (m *Entry) XXX_Size() int
- func (m *Entry) XXX_Unmarshal(b []byte) error
- type Entry_Add
- type Entry_Change
- type Entry_Delete
- type Entry_Rename
- type RaftClient
- type RaftServer
- type Rename
- func (*Rename) Descriptor() ([]byte, []int)
- func (m *Rename) GetId() uint64
- func (m *Rename) GetNewName() string
- func (m *Rename) GetNewParentId() uint64
- func (m *Rename) GetOldName() string
- func (m *Rename) GetOldParentId() uint64
- func (*Rename) ProtoMessage()
- func (m *Rename) Reset()
- func (m *Rename) String() string
- func (m *Rename) XXX_DiscardUnknown()
- func (m *Rename) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rename) XXX_Merge(src proto.Message)
- func (m *Rename) XXX_Size() int
- func (m *Rename) XXX_Unmarshal(b []byte) error
- type UnimplementedRaftServer
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) GetIsHardLink ¶
func (*Add) GetParentId ¶
func (*Add) ProtoMessage ¶
func (*Add) ProtoMessage()
func (*Add) XXX_DiscardUnknown ¶
func (m *Add) XXX_DiscardUnknown()
func (*Add) XXX_Unmarshal ¶
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) GetVersion ¶
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
func (*Change) XXX_DiscardUnknown ¶
func (m *Change) XXX_DiscardUnknown()
func (*Change) XXX_Marshal ¶
func (*Change) XXX_Unmarshal ¶
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) GetParentId ¶
func (*Delete) ProtoMessage ¶
func (*Delete) ProtoMessage()
func (*Delete) XXX_DiscardUnknown ¶
func (m *Delete) XXX_DiscardUnknown()
func (*Delete) XXX_Marshal ¶
func (*Delete) XXX_Unmarshal ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
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) GetMessage ¶
func (m *Entry) GetMessage() isEntry_Message
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) XXX_DiscardUnknown ¶
func (m *Entry) XXX_DiscardUnknown()
func (*Entry) XXX_Marshal ¶
func (*Entry) XXX_OneofWrappers ¶
func (*Entry) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Entry) XXX_Unmarshal ¶
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 ¶
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) GetNewName ¶
func (*Rename) GetNewParentId ¶
func (*Rename) GetOldName ¶
func (*Rename) GetOldParentId ¶
func (*Rename) ProtoMessage ¶
func (*Rename) ProtoMessage()
func (*Rename) XXX_DiscardUnknown ¶
func (m *Rename) XXX_DiscardUnknown()
func (*Rename) XXX_Marshal ¶
func (*Rename) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.