diskstore

package
v0.0.0-...-6ce3ea9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Addr_TypeID = 0xe45f1d3ad96f0c55

Addr_TypeID is the unique identifier for the type Addr.

View Source
const CompressionScheme_TypeID = 0xa9e5a7728baf3d2e

CompressionScheme_TypeID is the unique identifier for the type CompressionScheme.

View Source
const LogEntry_TypeID = 0xd848462725353ce8

LogEntry_TypeID is the unique identifier for the type LogEntry.

View Source
const Manifest_TypeID = 0xe09672577fe40a61

Manifest_TypeID is the unique identifier for the type Manifest.

View Source
const (
	StorageFormatVersion = uint32(1)
)

Constants defined in diskstore.capnp.

View Source
const TrieMap_TypeID = 0xcc6f8e43c0d837f7

TrieMap_TypeID is the unique identifier for the type TrieMap.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr capnp.Struct

func NewAddr

func NewAddr(s *capnp.Segment) (Addr, error)

func NewRootAddr

func NewRootAddr(s *capnp.Segment) (Addr, error)

func ReadRootAddr

func ReadRootAddr(msg *capnp.Message) (Addr, error)

func (Addr) DecodeFromPtr

func (Addr) DecodeFromPtr(p capnp.Ptr) Addr

func (Addr) EncodeAsPtr

func (s Addr) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Addr) IsValid

func (s Addr) IsValid() bool

func (Addr) Length

func (s Addr) Length() uint32

func (Addr) LogNumber

func (s Addr) LogNumber() uint64

func (Addr) Message

func (s Addr) Message() *capnp.Message

func (Addr) Offset

func (s Addr) Offset() uint64

func (Addr) Segment

func (s Addr) Segment() *capnp.Segment

func (Addr) SetLength

func (s Addr) SetLength(v uint32)

func (Addr) SetLogNumber

func (s Addr) SetLogNumber(v uint64)

func (Addr) SetOffset

func (s Addr) SetOffset(v uint64)

func (Addr) String

func (s Addr) String() string

func (Addr) ToPtr

func (s Addr) ToPtr() capnp.Ptr

type Addr_Future

type Addr_Future struct{ *capnp.Future }

Addr_Future is a wrapper for a Addr promised by a client call.

func (Addr_Future) Struct

func (f Addr_Future) Struct() (Addr, error)

type Addr_List

type Addr_List = capnp.StructList[Addr]

Addr_List is a list of Addr.

func NewAddr_List

func NewAddr_List(s *capnp.Segment, sz int32) (Addr_List, error)

NewAddr creates a new list of Addr.

type CompressionScheme

type CompressionScheme uint16
const (
	CompressionScheme_none CompressionScheme = 0
	CompressionScheme_xz   CompressionScheme = 1
)

Values of CompressionScheme.

func CompressionSchemeFromString

func CompressionSchemeFromString(c string) CompressionScheme

CompressionSchemeFromString returns the enum value with a name, or the zero value if there's no such value.

func (CompressionScheme) String

func (c CompressionScheme) String() string

String returns the enum's constant name.

type CompressionScheme_List

type CompressionScheme_List = capnp.EnumList[CompressionScheme]

func NewCompressionScheme_List

func NewCompressionScheme_List(s *capnp.Segment, sz int32) (CompressionScheme_List, error)

type LogEntry

type LogEntry capnp.Struct

func NewLogEntry

func NewLogEntry(s *capnp.Segment) (LogEntry, error)

func NewRootLogEntry

func NewRootLogEntry(s *capnp.Segment) (LogEntry, error)

func ReadRootLogEntry

func ReadRootLogEntry(msg *capnp.Message) (LogEntry, error)

func (LogEntry) Blob

func (s LogEntry) Blob() LogEntry_blob

func (LogEntry) DecodeFromPtr

func (LogEntry) DecodeFromPtr(p capnp.Ptr) LogEntry

func (LogEntry) EncodeAsPtr

func (s LogEntry) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (LogEntry) HasIndexNode

func (s LogEntry) HasIndexNode() bool

func (LogEntry) IndexNode

func (s LogEntry) IndexNode() (TrieMap, error)

func (LogEntry) IsValid

func (s LogEntry) IsValid() bool

func (LogEntry) Message

func (s LogEntry) Message() *capnp.Message

func (LogEntry) NewIndexNode

func (s LogEntry) NewIndexNode() (TrieMap, error)

NewIndexNode sets the indexNode field to a newly allocated TrieMap struct, preferring placement in s's segment.

func (LogEntry) Segment

func (s LogEntry) Segment() *capnp.Segment

func (LogEntry) SetBlob

func (s LogEntry) SetBlob()

func (LogEntry) SetIndexNode

func (s LogEntry) SetIndexNode(v TrieMap) error

func (LogEntry) String

func (s LogEntry) String() string

func (LogEntry) ToPtr

func (s LogEntry) ToPtr() capnp.Ptr

func (LogEntry) Which

func (s LogEntry) Which() LogEntry_Which

type LogEntry_Future

type LogEntry_Future struct{ *capnp.Future }

LogEntry_Future is a wrapper for a LogEntry promised by a client call.

func (LogEntry_Future) Blob

func (LogEntry_Future) IndexNode

func (p LogEntry_Future) IndexNode() TrieMap_Future

func (LogEntry_Future) Struct

func (f LogEntry_Future) Struct() (LogEntry, error)

type LogEntry_List

type LogEntry_List = capnp.StructList[LogEntry]

LogEntry_List is a list of LogEntry.

func NewLogEntry_List

func NewLogEntry_List(s *capnp.Segment, sz int32) (LogEntry_List, error)

NewLogEntry creates a new list of LogEntry.

type LogEntry_Which

type LogEntry_Which uint16
const (
	LogEntry_Which_blob      LogEntry_Which = 0
	LogEntry_Which_indexNode LogEntry_Which = 1
)

func (LogEntry_Which) String

func (w LogEntry_Which) String() string

type LogEntry_blob

type LogEntry_blob LogEntry

func (LogEntry_blob) Compression

func (s LogEntry_blob) Compression() CompressionScheme

func (LogEntry_blob) HasSegment_

func (s LogEntry_blob) HasSegment_() bool

func (LogEntry_blob) IsValid

func (s LogEntry_blob) IsValid() bool

func (LogEntry_blob) Message

func (s LogEntry_blob) Message() *capnp.Message

func (LogEntry_blob) Packed

func (s LogEntry_blob) Packed() bool

func (LogEntry_blob) Segment

func (s LogEntry_blob) Segment() *capnp.Segment

func (LogEntry_blob) Segment_

func (s LogEntry_blob) Segment_() ([]byte, error)

func (LogEntry_blob) SetCompression

func (s LogEntry_blob) SetCompression(v CompressionScheme)

func (LogEntry_blob) SetPacked

func (s LogEntry_blob) SetPacked(v bool)

func (LogEntry_blob) SetSegment_

func (s LogEntry_blob) SetSegment_(v []byte) error

type LogEntry_blob_Future

type LogEntry_blob_Future struct{ *capnp.Future }

LogEntry_blob_Future is a wrapper for a LogEntry_blob promised by a client call.

func (LogEntry_blob_Future) Struct

type Manifest

type Manifest capnp.Struct

func NewManifest

func NewManifest(s *capnp.Segment) (Manifest, error)

func NewRootManifest

func NewRootManifest(s *capnp.Segment) (Manifest, error)

func ReadRootManifest

func ReadRootManifest(msg *capnp.Message) (Manifest, error)

func (Manifest) BlobMap

func (s Manifest) BlobMap() (Addr, error)

func (Manifest) DecodeFromPtr

func (Manifest) DecodeFromPtr(p capnp.Ptr) Manifest

func (Manifest) EncodeAsPtr

func (s Manifest) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Manifest) FormatVersion

func (s Manifest) FormatVersion() uint32

func (Manifest) HasBlobMap

func (s Manifest) HasBlobMap() bool

func (Manifest) HasRoot

func (s Manifest) HasRoot() bool

func (Manifest) IsValid

func (s Manifest) IsValid() bool

func (Manifest) LastLog

func (s Manifest) LastLog() Manifest_lastLog

func (Manifest) Message

func (s Manifest) Message() *capnp.Message

func (Manifest) NewBlobMap

func (s Manifest) NewBlobMap() (Addr, error)

NewBlobMap sets the blobMap field to a newly allocated Addr struct, preferring placement in s's segment.

func (Manifest) NewRoot

func (s Manifest) NewRoot() (protocol.ContentId, error)

NewRoot sets the root field to a newly allocated protocol.ContentId struct, preferring placement in s's segment.

func (Manifest) Root

func (s Manifest) Root() (protocol.ContentId, error)

func (Manifest) Segment

func (s Manifest) Segment() *capnp.Segment

func (Manifest) SetBlobMap

func (s Manifest) SetBlobMap(v Addr) error

func (Manifest) SetFormatVersion

func (s Manifest) SetFormatVersion(v uint32)

func (Manifest) SetRoot

func (s Manifest) SetRoot(v protocol.ContentId) error

func (Manifest) String

func (s Manifest) String() string

func (Manifest) ToPtr

func (s Manifest) ToPtr() capnp.Ptr

type Manifest_Future

type Manifest_Future struct{ *capnp.Future }

Manifest_Future is a wrapper for a Manifest promised by a client call.

func (Manifest_Future) BlobMap

func (p Manifest_Future) BlobMap() Addr_Future

func (Manifest_Future) LastLog

func (Manifest_Future) Root

func (Manifest_Future) Struct

func (f Manifest_Future) Struct() (Manifest, error)

type Manifest_List

type Manifest_List = capnp.StructList[Manifest]

Manifest_List is a list of Manifest.

func NewManifest_List

func NewManifest_List(s *capnp.Segment, sz int32) (Manifest_List, error)

NewManifest creates a new list of Manifest.

type Manifest_lastLog

type Manifest_lastLog Manifest

func (Manifest_lastLog) IsValid

func (s Manifest_lastLog) IsValid() bool

func (Manifest_lastLog) Message

func (s Manifest_lastLog) Message() *capnp.Message

func (Manifest_lastLog) Number

func (s Manifest_lastLog) Number() uint64

func (Manifest_lastLog) Segment

func (s Manifest_lastLog) Segment() *capnp.Segment

func (Manifest_lastLog) SetNumber

func (s Manifest_lastLog) SetNumber(v uint64)

func (Manifest_lastLog) SetSize

func (s Manifest_lastLog) SetSize(v uint64)

func (Manifest_lastLog) Size

func (s Manifest_lastLog) Size() uint64

type Manifest_lastLog_Future

type Manifest_lastLog_Future struct{ *capnp.Future }

Manifest_lastLog_Future is a wrapper for a Manifest_lastLog promised by a client call.

func (Manifest_lastLog_Future) Struct

type TrieMap

type TrieMap capnp.Struct

func NewRootTrieMap

func NewRootTrieMap(s *capnp.Segment) (TrieMap, error)

func NewTrieMap

func NewTrieMap(s *capnp.Segment) (TrieMap, error)

func ReadRootTrieMap

func ReadRootTrieMap(msg *capnp.Message) (TrieMap, error)

func (TrieMap) Branches

func (s TrieMap) Branches() (Addr_List, error)

func (TrieMap) DecodeFromPtr

func (TrieMap) DecodeFromPtr(p capnp.Ptr) TrieMap

func (TrieMap) EncodeAsPtr

func (s TrieMap) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (TrieMap) HasBranches

func (s TrieMap) HasBranches() bool

func (TrieMap) IsValid

func (s TrieMap) IsValid() bool

func (TrieMap) Leaf

func (s TrieMap) Leaf() TrieMap_leaf

func (TrieMap) Message

func (s TrieMap) Message() *capnp.Message

func (TrieMap) NewBranches

func (s TrieMap) NewBranches(n int32) (Addr_List, error)

NewBranches sets the branches field to a newly allocated Addr_List, preferring placement in s's segment.

func (TrieMap) Segment

func (s TrieMap) Segment() *capnp.Segment

func (TrieMap) SetBranches

func (s TrieMap) SetBranches(v Addr_List) error

func (TrieMap) SetLeaf

func (s TrieMap) SetLeaf()

func (TrieMap) String

func (s TrieMap) String() string

func (TrieMap) ToPtr

func (s TrieMap) ToPtr() capnp.Ptr

func (TrieMap) Which

func (s TrieMap) Which() TrieMap_Which

type TrieMap_Future

type TrieMap_Future struct{ *capnp.Future }

TrieMap_Future is a wrapper for a TrieMap promised by a client call.

func (TrieMap_Future) Leaf

func (TrieMap_Future) Struct

func (f TrieMap_Future) Struct() (TrieMap, error)

type TrieMap_List

type TrieMap_List = capnp.StructList[TrieMap]

TrieMap_List is a list of TrieMap.

func NewTrieMap_List

func NewTrieMap_List(s *capnp.Segment, sz int32) (TrieMap_List, error)

NewTrieMap creates a new list of TrieMap.

type TrieMap_Which

type TrieMap_Which uint16
const (
	TrieMap_Which_leaf     TrieMap_Which = 0
	TrieMap_Which_branches TrieMap_Which = 1
)

func (TrieMap_Which) String

func (w TrieMap_Which) String() string

type TrieMap_leaf

type TrieMap_leaf TrieMap

func (TrieMap_leaf) Addr

func (s TrieMap_leaf) Addr() (Addr, error)

func (TrieMap_leaf) HasAddr

func (s TrieMap_leaf) HasAddr() bool

func (TrieMap_leaf) HasPrefix

func (s TrieMap_leaf) HasPrefix() bool

func (TrieMap_leaf) IsValid

func (s TrieMap_leaf) IsValid() bool

func (TrieMap_leaf) Message

func (s TrieMap_leaf) Message() *capnp.Message

func (TrieMap_leaf) NewAddr

func (s TrieMap_leaf) NewAddr() (Addr, error)

NewAddr sets the addr field to a newly allocated Addr struct, preferring placement in s's segment.

func (TrieMap_leaf) Prefix

func (s TrieMap_leaf) Prefix() ([]byte, error)

func (TrieMap_leaf) Segment

func (s TrieMap_leaf) Segment() *capnp.Segment

func (TrieMap_leaf) SetAddr

func (s TrieMap_leaf) SetAddr(v Addr) error

func (TrieMap_leaf) SetPrefix

func (s TrieMap_leaf) SetPrefix(v []byte) error

type TrieMap_leaf_Future

type TrieMap_leaf_Future struct{ *capnp.Future }

TrieMap_leaf_Future is a wrapper for a TrieMap_leaf promised by a client call.

func (TrieMap_leaf_Future) Addr

func (TrieMap_leaf_Future) Struct

func (f TrieMap_leaf_Future) Struct() (TrieMap_leaf, error)

Jump to

Keyboard shortcuts

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