appcontext

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

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SensuRepository = "SensuRepository"
)

List of consts containing the names of the available componentes in the Application Context - appcontext.Current

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationContext

type ApplicationContext struct {
	// contains filtered or unexported fields
}

ApplicationContext is the type defining a map of Components

var Current ApplicationContext

Current keeps all components available, initialized in the application startup

func CreateApplicationContext

func CreateApplicationContext() ApplicationContext

CreateApplicationContext creates a new ApplicationContext instance

func (*ApplicationContext) Add

func (applicationContext *ApplicationContext) Add(componentName string, component Component)

Add a component By Name

func (*ApplicationContext) Count

func (applicationContext *ApplicationContext) Count() int

Count returns the count of components registered

func (*ApplicationContext) Delete

func (applicationContext *ApplicationContext) Delete(componentName string)

Delete a component By Name

func (*ApplicationContext) Get

func (applicationContext *ApplicationContext) Get(componentName string) Component

Get a component By Name

type Component

type Component interface{}

Component is the Base interface for all Components

Jump to

Keyboard shortcuts

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