env

package
v0.0.0-...-73d3f13 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogBuildMetadata

func LogBuildMetadata(main *logberry.Task, build *BuildMetadata)

BuildMetadataEvent generates a configuration log event for the given Task reporting the build configuration, as captured by the passed object. A utility script to generate such metadata automatically is in the util/ folder of the Logberry repository.

func LogBuildSignature

func LogBuildSignature(main *logberry.Task, build string)

BuildSignatureEvent generates a configuration log event for the given Task reporting build configuration, as captured by the given string. A utility script to generate such metadata automatically is in the util/ folder of the Logberry repository. It can be useful to use this string rather than a BuildMetadata object so that it can be passed in through the standard go tools command line, i.e., via linker flags.

func LogCommandLine

func LogCommandLine(main *logberry.Task) error

CommandLineEvent generates a configuration log event for the given Task reporting the command line used to execute the currently executing process.

func LogConfiguration

func LogConfiguration(main *logberry.Task, data ...interface{})

ConfigurationEvent generates a configuration log event for the given Task reporting parameters or other initialization data. The variadic data parameter is aggregated as a D and reporting with the event, as is the data permanently associated with the Task. The given data is not associated to the Task permanently.

func LogEnvironment

func LogEnvironment(main *logberry.Task)

EnvironmentEvent generates a configuration log event for the given Task reporting the current operating system host environment variables of the currently executing process.

func LogProcess

func LogProcess(main *logberry.Task) error

ProcessEvent generates a configuration log event for the given Task reporting identifiers for the currently executing process.

func LogVersion

func LogVersion(main *logberry.Task, data ...interface{})

Types

type BuildMetadata

type BuildMetadata struct {
	Host string
	User string
	Date string

	Repositories []RepositoryMetadata
}

BuildMetadata is a simple structured representation of some basic properties characterizing the build of a particular binary.

func (*BuildMetadata) Map

func (x *BuildMetadata) Map() map[string]*RepositoryMetadata

type RepositoryMetadata

type RepositoryMetadata struct {
	Repository string
	Branch     string
	Commit     string
	Dirty      bool
	Path       string
}

RepositoryMetadata captures basic identifying properties of a typical source version control repository instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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