Documentation ¶
Index ¶
- Constants
- type Config
- type DistributedLog
- type Log
- func (l *Log) Append(record *api.Record) (uint64, error)
- func (l *Log) Close() error
- func (l *Log) HighestOffset() (uint64, error)
- func (l *Log) LowestOffset() (uint64, error)
- func (l *Log) Read(off uint64) (*api.Record, error)
- func (l *Log) Reader() io.Reader
- func (l *Log) Remove() error
- func (l *Log) Reset() error
- func (l *Log) Truncate(lowest uint64) error
- type Replicator
- type RequestType
- type StreamLayer
Constants ¶
View Source
const RaftRPC = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributedLog ¶
type DistributedLog struct {
// contains filtered or unexported fields
}
func NewDistributedLog ¶
func NewDistributedLog(dataDir string, config Config) (*DistributedLog, error)
type Replicator ¶
type Replicator struct { DialOptions []grpc.DialOption LocalServer api.LogClient // contains filtered or unexported fields }
func (*Replicator) Join ¶
func (r *Replicator) Join(name, addr string) error
type StreamLayer ¶
type StreamLayer struct {
// contains filtered or unexported fields
}
func NewStreamLayer ¶
func NewStreamLayer(ln net.Listener, serverTLSConfig, peerTLSConfig *tls.Config) *StreamLayer
func (*StreamLayer) Addr ¶
func (s *StreamLayer) Addr() net.Addr
func (*StreamLayer) Close ¶
func (s *StreamLayer) Close() error
func (*StreamLayer) Dial ¶
func (s *StreamLayer) Dial(addr raft.ServerAddress, timeout time.Duration) (net.Conn, error)
Click to show internal directories.
Click to hide internal directories.