Documentation ¶
Overview ¶
Package snapshot is used to create and read byte dumps of objects. This package was created to improve startup times, for example the whole VM, which takes time to create. With this package, the VM can be snapshotted and restored to a certain state easily.
Index ¶
- Constants
- func Load(b []byte, v interface{}, size uintptr) error
- func Store(w io.Writer, v interface{}) error
- type Nested
- func (s Nested) Data() ([]byte, error)
- func (s Nested) HasData() bool
- func (s Nested) HasPointers() bool
- func (s Nested) Len() int64
- func (s Nested) NewPointers(n int32) (Pointer_List, error)
- func (s Nested) Pointers() (Pointer_List, error)
- func (s Nested) SetData(v []byte) error
- func (s Nested) SetLen(v int64)
- func (s Nested) SetPointers(v Pointer_List) error
- func (s Nested) String() string
- type Nested_List
- type Nested_Promise
- type Pointer
- type Pointer_List
- type Pointer_Promise
- type Snapshot
- type Snapshot_List
- type Snapshot_Promise
Constants ¶
const Nested_TypeID = 0x9a2e520f421c93df
Nested_TypeID is the unique identifier for the type Nested.
const Pointer_TypeID = 0xea00f2587b64b8bb
Pointer_TypeID is the unique identifier for the type Pointer.
const Snapshot_TypeID = 0xc499a1c127bebec9
Snapshot_TypeID is the unique identifier for the type Snapshot.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Nested ¶
func (Nested) HasPointers ¶
func (Nested) NewPointers ¶
func (s Nested) NewPointers(n int32) (Pointer_List, error)
NewPointers sets the pointers field to a newly allocated Pointer_List, preferring placement in s's segment.
func (Nested) Pointers ¶
func (s Nested) Pointers() (Pointer_List, error)
func (Nested) SetPointers ¶
func (s Nested) SetPointers(v Pointer_List) error
type Nested_List ¶
Nested_List is a list of Nested.
func NewNested_List ¶
func NewNested_List(s *capnp.Segment, sz int32) (Nested_List, error)
NewNested creates a new list of Nested.
func (Nested_List) At ¶
func (s Nested_List) At(i int) Nested
func (Nested_List) String ¶
func (s Nested_List) String() string
type Nested_Promise ¶
Nested_Promise is a wrapper for a Nested promised by a client call.
func (Nested_Promise) Struct ¶
func (p Nested_Promise) Struct() (Nested, error)
type Pointer ¶
type Pointer_List ¶
Pointer_List is a list of Pointer.
func NewPointer_List ¶
func NewPointer_List(s *capnp.Segment, sz int32) (Pointer_List, error)
NewPointer creates a new list of Pointer.
func (Pointer_List) At ¶
func (s Pointer_List) At(i int) Pointer
func (Pointer_List) String ¶
func (s Pointer_List) String() string
type Pointer_Promise ¶
Pointer_Promise is a wrapper for a Pointer promised by a client call.
func (Pointer_Promise) Struct ¶
func (p Pointer_Promise) Struct() (Pointer, error)
func (Pointer_Promise) Target ¶
func (p Pointer_Promise) Target() Nested_Promise
type Snapshot ¶
type Snapshot_List ¶
Snapshot_List is a list of Snapshot.
func NewSnapshot_List ¶
func NewSnapshot_List(s *capnp.Segment, sz int32) (Snapshot_List, error)
NewSnapshot creates a new list of Snapshot.
func (Snapshot_List) At ¶
func (s Snapshot_List) At(i int) Snapshot
func (Snapshot_List) String ¶
func (s Snapshot_List) String() string
type Snapshot_Promise ¶
Snapshot_Promise is a wrapper for a Snapshot promised by a client call.
func (Snapshot_Promise) Nested ¶
func (p Snapshot_Promise) Nested() Nested_Promise
func (Snapshot_Promise) Struct ¶
func (p Snapshot_Promise) Struct() (Snapshot, error)