context

package
v1.999.0-test Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package context defines a datamon context to store all metadata and logs for objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateContext

func CreateContext(ctx context.Context, configStore storage.Store, context model.Context) error

CreateContext marshals and persists a context in the remote config

func GetContext

func GetContext(ctx context.Context, configStore storage.Store, contextName string,
) (context *model.Context, err error)

GetContext downloads and unmarshals a context

Types

type Stores

type Stores interface {
	// Metadata yields the metadata storage for a context
	Metadata() storage.Store
	// SetMetadata sets the context storage for metadata, other than versioning metadata
	SetMetadata(metadata storage.Store)

	// ReadLog yields the Read Log storage for a context
	ReadLog() storage.Store
	// SetReadLog sets the context storage for Read Log
	SetReadLog(readLog storage.Store)

	// VMetadata yields the version metadata storage for a context
	VMetadata() storage.Store
	// SetVMetadata sets the context storage for versioning metadata
	SetVMetadata(vMetadata storage.Store)

	// Blob yields the Blob storage for a context
	Blob() storage.Store
	// SetBlob sets the context storage for blobs
	SetBlob(blob storage.Store)

	// Wal yields the Write Ahead Log storage for a context
	Wal() storage.Store
	// SetWal sets the context storage for Write Ahead Log
	SetWal(wal storage.Store)
}

Stores defines a complete context for datamon objects

func New

func New() Stores

New creates a new empty instance of context stores, to be set with the Setxxx methods.

func NewStores

func NewStores(wal, readLog, blob, metadata, vMetadata storage.Store) Stores

NewStores creates a new instance of context stores

Directories

Path Synopsis
Package gcs is a gcs implementation of the datamon context, with all context stores as gcs buckets
Package gcs is a gcs implementation of the datamon context, with all context stores as gcs buckets
Package status defines errors for datamon context
Package status defines errors for datamon context

Jump to

Keyboard shortcuts

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