Documentation ¶
Index ¶
- Constants
- Variables
- type Decoder
- type Encoder
- type Iterator
- type Options
- type Store
- func (s *Store) Address() string
- func (s *Store) Begin() (*Transaction, error)
- func (s *Store) BeginAt(timestamp time.Time) (*Transaction, error)
- func (s *Store) IsLeader() bool
- func (s *Store) IsStopped() bool
- func (s *Store) NextIncrementId(objectPath []byte) (uint64, error)
- func (s *Store) NextSequenceId(sequenceName string) (uint64, error)
- func (s *Store) NodeID() raft.ServerID
- func (s *Store) Start() error
- func (s *Store) Stop() error
- func (s *Store) WaitForLeader(timeout time.Duration) (leaderAddress string, hasLeader bool, err error)
- type Transaction
- func (s *Transaction) Commit() error
- func (s *Transaction) Delete(key []byte) error
- func (s *Transaction) Get(key []byte) ([]byte, bool, error)
- func (s *Transaction) GetIterator(prefix []byte, keyOnly bool, reverse bool) *Iterator
- func (s *Transaction) IsLeader() bool
- func (s *Transaction) IsStopped() bool
- func (s *Transaction) MustGet(key []byte) ([]byte, bool, error)
- func (s *Transaction) NextIncrementId(objectPath []byte) (uint64, error)
- func (s *Transaction) NextSequenceId(sequenceName string) (uint64, error)
- func (s *Transaction) NodeID() raft.ServerID
- func (s *Transaction) Rollback() error
- func (s *Transaction) Set(key, value []byte) error
- func (s *Transaction) WaitForLeader(timeout time.Duration) (leaderAddress string, hasLeader bool, err error)
Constants ¶
View Source
const ( SequenceRangeSize = 1000 SequencePartitions = 5 SequencePreretrieve = 50 )
Variables ¶
View Source
var (
ErrNotFound = fmt.Errorf("not found")
)
View Source
var (
ErrStopped = fmt.Errorf("barge has been stopped")
)
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) ValidForPrefix ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Begin ¶
func (s *Store) Begin() (*Transaction, error)
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Commit ¶
func (s *Transaction) Commit() error
func (*Transaction) Delete ¶
func (s *Transaction) Delete(key []byte) error
func (*Transaction) GetIterator ¶
func (s *Transaction) GetIterator(prefix []byte, keyOnly bool, reverse bool) *Iterator
func (*Transaction) IsLeader ¶
func (s *Transaction) IsLeader() bool
func (*Transaction) IsStopped ¶
func (s *Transaction) IsStopped() bool
func (*Transaction) NextIncrementId ¶
func (s *Transaction) NextIncrementId(objectPath []byte) (uint64, error)
func (*Transaction) NextSequenceId ¶
func (s *Transaction) NextSequenceId(sequenceName string) (uint64, error)
func (*Transaction) NodeID ¶
func (s *Transaction) NodeID() raft.ServerID
func (*Transaction) Rollback ¶
func (s *Transaction) Rollback() error
func (*Transaction) Set ¶
func (s *Transaction) Set(key, value []byte) error
func (*Transaction) WaitForLeader ¶
Source Files ¶
- append_entries_request.go
- append_entries_response.go
- apply_transaction_request.go
- apply_transaction_response.go
- barge.go
- discovery_request.go
- discovery_response.go
- dist_sequence_cache.go
- dist_sequence_request.go
- dist_sequence_response.go
- driver.go
- error_response.go
- fsm.go
- handshake_request.go
- handshake_response.go
- identity_request.go
- identity_response.go
- increment_request.go
- increment_response.go
- increment_sequence.go
- install_snapshot_request.go
- install_snapshot_response.go
- join_request.go
- join_response.go
- log.go
- log_store.go
- meles.go
- messages.go
- node.go
- prefixes.go
- raft_wire.go
- request_vote_request.go
- request_vote_response.go
- sequence.go
- server.go
- snapshot.go
- stable_store.go
- store.go
- transaction.go
- transport.go
- wrapper.go
Click to show internal directories.
Click to hide internal directories.