resource

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package resource contains utilities for performing low-level manipulations of projection resource versions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromApplicationKey

func FromApplicationKey(k string) []byte

FromApplicationKey returns the resource to use for the given application with the given identity key.

func MarshalOffset

func MarshalOffset(o uint64) []byte

MarshalOffset marshals a stream offset to a resource version.

o is the next offset to be read from the stream, not the last offset that was applied to the projection.

func MarshalOffsetInto

func MarshalOffsetInto(buf []byte, o uint64) []byte

MarshalOffsetInto marshals a stream offset using the memory of an existing buffer.

buf is the buffer to use, it must be at least 8 bytes in length.

o is the next offset to be read from the stream, not the last offset that was applied to the projection.

func UnmarshalOffset

func UnmarshalOffset(v []byte) (uint64, error)

UnmarshalOffset unmarshals a stream offset from a resource version.

It returns the next offset to be read from the stream, not the last offset that was applied to the projection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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