defaults

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// XeneBanner is the ascii art acting as a banner for xene.
	XeneBanner string = `` /* 243-byte string literal not displayed */

	// XeneConfigFile is the file name for xene config.
	XeneConfigFile string = "/etc/xene/conf/xene.yaml"

	// XeneCtlConfigFile is the file name for xenectl config.
	XeneCtlConfigFile string = "/etc/xene/conf/xenectl.yaml"

	// APIServerHost is the default host to bind the API Server to.
	APIServerHost string = "0.0.0.0"

	// APIServerPort is the default port that the apiserver listens to, this can be
	// overridden when initializing the server.
	APIServerPort uint32 = 6060

	// APIServerScheme is the default server scheme to use for the API server.
	APIServerScheme string = "http"

	// GrpcServerScheme is the default scheme to use for GRPC server
	GrpcServerScheme string = "http"

	// APIServerTimeout is the default value of timeout for server shutdown.
	APIServerTimeout time.Duration = 5 * time.Second

	// APIServerUnixSocketPath is the default path where the unix domain socket is created
	// for the xene server.
	APIServerUnixSocketPath string = "/var/run/xene/xene.sock"

	// TimeFormat is the default format of time we use within xene.
	TimeFormat string = "01-Jan-1970:15:04:05 -0700"

	// JWTExpireInterval is the default value of the duration for the issued
	// JWT token to expire.
	// The default for this is 48 Hours ie: 2 days
	JWTExpireInterval time.Duration = 48 * time.Hour

	// JWTRefreshInterval is the default value of the duration for the issued
	// token to be refreshed before.
	JWTRefreshInterval time.Duration = 64 * time.Hour

	// JWTAuthType is the default type of authentication we support.
	JWTAuthType string = "Bearer"

	// ContextBucketKey is the key which is set in the context after JWT has been
	// verified from the Authentication header.
	ContextBucketKey string = "user"

	// Seperator is the seperator when constructing names.
	Seperator string = "--"

	// ImagePullDeadline is the timeout duration for the image pull action using
	// the container runtime
	ImagePullDeadline time.Duration = time.Minute * 5

	// CreateContainerTimeout is the timeout for a create container request.
	CreateContainerTimeout time.Duration = time.Second * 10
)
View Source
const (
	// StorageDir is the directory to use for the local store to save
	// and data corresponding to xene.
	StorageDir string = "/var/run/xene/store"

	// StorageEngineBadger is the name of the stroage engine corresponding to
	// dgraph-io/badger key value store.
	StorageEngineBadger string = "badger"

	// StoreControllerRunInterval contains the run interval for store configured
	// controller do functions.
	StoreControllerRunInterval time.Duration = time.Second * 15

	// StoreControllerNameLength is the length of the store controller name
	StoreControllerNameLength uint32 = 12
)

Variables

View Source
var (
	// AgentHost is the default host to bind the Agent to.
	AgentHost string = "0.0.0.0"

	// AgentPort is the port to bind the agent GRPC server on.
	AgentPort uint32 = 6061

	// AgentStorageDir is the storage directory for xene agent
	AgentStorageDir string = "/var/run/xene/agent/store/"

	// AgentVersion contains the version information regarding the agent.
	AgentVersion string = "v1alpha1"

	// PipelineIDSize contains the size of the string representing the
	// Pipeline ID.
	PipelineIDSize uint32 = 20

	// AgentLogsDir is the path containing the logs for the agent.
	AgentLogsDir string = "/var/run/xene/agent/logs"

	// AgentAssetsDir contains the directory path of the agent assets.
	AgentAssetsDir string = "/var/run/xene/agent/assets"

	// AgentMountScript contains the path to agent mount script for containers
	// on the agent.
	AgentMountScript string = fmt.Sprintf("%s/agent-cmd-run.sh", AgentAssetsDir)

	// AgentMountContainerScript is the path of the sciript of agent command runner
	// inside the container.
	AgentMountContainerScript string = "/usr/local/bin/xene-cmd-run.sh"

	// GlobalPipelineTimeout is the global timeout of the pipeline run on agent.
	GlobalPipelineTimeout time.Duration = time.Minute * 100

	// AgentLogServerPort is the port to bind the agent log server on.
	AgentLogServerPort uint32 = 6062
)
View Source
var (
	// ControllerType is the default controller type we are assigning to the created
	// controller.
	ControllerType string = "Default"

	// ControllerRetryInterval is the interval for controller function execution retry.
	ControllerRetryInterval time.Duration = 1 * time.Second

	// ControllerInvalidDuration is the placeholder time duration for the execution
	// of the function when there is some error in exeuction.
	ControllerInvalidDuration time.Duration = 1000 * time.Second

	// AgentHealthCheckRetriesLimit is the limit on consecutive error while checking healths
	// of the agent. If more then limit number of consecutive error occur during the health
	// check, the agent is blacklisted.
	AgentHealthCheckRetriesLimit int64 = 3

	// AgentHealthCheckInterval is the default value of time interval at which to execute
	// the health checks for configured agents.
	AgentHealthCheckInterval time.Duration = time.Second * 5
)
View Source
var (
	// SecretTypeDefault is the type for default secrets in xene.
	SecretTypeDefault string = "default"

	// SecretTypeCertificates is the type for certificate secrets in xene.
	SecretTypeCertificates string = "certificate"
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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