context

package
v0.0.0-...-678448a Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2016 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package context is the runtime context of GlusterD

Any package that needs access to the GlusterD runtime context just needs to import this package.

Index

Constants

View Source
const (
	MaxOpVersion    = 40000
	APIVersion      = 1
	GlusterdVersion = "4.0-dev"
)

Various version constants that will be used by GD2

Variables

View Source
var (
	MyUUID    uuid.UUID
	Rest      *rest.GDRest
	TxnFw     *transaction.GDTxnFw
	OpVersion int
)

Any object that is a part of the GlusterD context and needs to be available to other packages should be declared here as exported global variables

View Source
var (
	Store *store.GDStore
)

If someone needs to use the GD2 store, all they need to do is just import context and use context.Store

Functions

func Init

func Init()

Init initializes the GlusterD context. This should be called once before doing anything else.

func RegisterStorePrefix

func RegisterStorePrefix(prefix string)

RegisterStorePrefix allows other packages to register prefixes to be initalized on the store. The prefixes will be created on the store during GD2 context intialization

Types

This section is empty.

Jump to

Keyboard shortcuts

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