info

package
Version: v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContainerInfoDescriptor = refer.NewDescriptor("pip-services", "container-info", "default", "*", "1.0")
View Source
var ContainerInfoDescriptor2 = refer.NewDescriptor("pip-services-container", "container-info", "default", "*", "1.0")
View Source
var ContextInfoDescriptor = refer.NewDescriptor("pip-services", "context-info", "default", "*", "1.0")

Functions

func NewDefaultInfoFactory

func NewDefaultInfoFactory() *build.Factory

Types

type ContextInfo

type ContextInfo struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	ContextId   string            `json:"context_id"`
	StartTime   time.Time         `json:"start_time"`
	Properties  map[string]string `json:"properties"`
}

func NewContextInfo

func NewContextInfo() *ContextInfo

Creates a new instance of this context info. Returns *ContextInfo

func NewContextInfoFromConfig

func NewContextInfoFromConfig(cfg *config.ConfigParams) *ContextInfo

Creates a new instance of this context info. Parameters:

  • ncfg *config.ConfigParams a context configuration parameters.

Returns *ContextInfo

func (*ContextInfo) Configure

func (c *ContextInfo) Configure(cfg *config.ConfigParams)

Configures component by passing configuration parameters. Parameters:

  • config *config.ConfigParams configuration parameters to be set.

func (*ContextInfo) Uptime

func (c *ContextInfo) Uptime() int64

Calculates the context uptime as from the start time. Returns int64 number of milliseconds from the context start time.

Jump to

Keyboard shortcuts

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