config

package
v0.0.0-...-5d6adc1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CloudGCE GCE cloud
	CloudGCE = "gce"
	// CloudAWS AWS cloud
	CloudAWS = "aws"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

type Cloud struct {
	// Cloud type - gce at the moment
	Type string `yaml:"type" validate:"required,oneof=gce"`
	// Project ID - required for now though not common to AWS
	ProjectID string `yaml:"projectid" validate:"required"`
}

Cloud configuration for cloud used

type Container

type Container struct {
	// Cloud specific settings
	Cloud *Cloud `yaml:"cloud" validate:"required"`
	// Logging settings
	Loging *Logging `yaml:"logging" validate:"required,dive,required"`
	// Context of running instance
	Context *Context `yaml:"context" validate:"required"`
}

Container config for app

func Config

func Config() *Container

Config get loaded config

type Context

type Context struct {
	// Context instance is running in - standalone or group
	RunContext string `yaml:"runcontext" validate:"required,oneof=standalone group"`
	// The name of the instance group, if any, that instance is running in
	GroupName string `yaml:"groupname"`
}

Context the context an instance is running in

type Logging

type Logging struct {
	// Name of log for cloud logging
	Name string `yaml:"name" validate:"required"`
	// Default log level
	Level string `yaml:"level" validate:"required,oneof=debug info alert warn error"`
}

Logging settings tied to logging

Jump to

Keyboard shortcuts

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