lock

package module
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 2 Imported by: 0

README

glock Build Status

some jobs in a CI/CD pipeline just aren't designed to run in parallel

$ glock -help

Usage of glock:
  -expiration duration
        time after the lock gets removed, even if unlock isn't called (default 15m0s)
  -key string
        (optional) locking key
  -lock
        should I aquire a lock? Returns 0 if lock is aquired and not 0 if error occured or lock wasn't granted
  -scope string
        can be job, stage or project (default "job")
  -unlock
        unlock the locked thing
  -v int
        (default 3) set verbosity level (3: Warning, 4: Info, 5: Debug) (default 3)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	ProjectId   int    `envconfig:"CI_PROJECT_ID"`
	ProjectName string `envconfig:"CI_PROJECT_NAME"`
	PipelineId  int    `envconfig:"CI_PIPELINE_ID"`
	JobId       int    `envconfig:"CI_JOB_ID"`
	JobName     string `envconfig:"CI_JOB_NAME"`
	JobStage    string `envconfig:"CI_JOB_STAGE"`

	RedisHost string `envconfig:"LOCKS_REDIS_HOST"`
}

func LoadEnvironment

func LoadEnvironment() (*Environment, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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