store

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OIDBytea     uint32 = 17
	OIDInt8      uint32 = 20
	OIDText      uint32 = 25
	OIDFloat8    uint32 = 701
	OIDTimestamp uint32 = 1114
)
View Source
const SnapshotVersion byte = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyResponse

type ApplyResponse struct {
	Error  error
	Result sql.Result
}

type FSMSnapshot

type FSMSnapshot struct {
	// contains filtered or unexported fields
}

func (*FSMSnapshot) Persist

func (f *FSMSnapshot) Persist(sink raft.SnapshotSink) error

func (*FSMSnapshot) Release

func (f *FSMSnapshot) Release()

type LogCommand

type LogCommand struct {
	Type  string
	SQL   string
	Batch []string
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(dbPath string) (*Store, error)

func (*Store) Apply

func (s *Store) Apply(log *raft.Log) interface{}

func (*Store) Close

func (s *Store) Close() error

func (*Store) Ping

func (s *Store) Ping() error

func (*Store) Query

func (s *Store) Query(sql string) ([]pgproto3.FieldDescription, [][][]byte, error)

func (*Store) Replicate

func (s *Store) Replicate(sql string) error

func (*Store) ReplicateBatch

func (s *Store) ReplicateBatch(batch []string) error

func (*Store) Restore

func (s *Store) Restore(snapshot io.ReadCloser) error

func (*Store) SetRaft

func (s *Store) SetRaft(r *raft.Raft)

func (*Store) Snapshot

func (s *Store) Snapshot() (raft.FSMSnapshot, error)

Jump to

Keyboard shortcuts

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