common

package
Version: v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorePrefix = "agola"
)

Variables

This section is empty.

Functions

func NewEtcd

func NewEtcd(c *config.Etcd, logger *zap.Logger, prefix string) (*etcd.Store, error)

func WriteFileAtomic

func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error

WriteFileAtomic atomically writes a file

func WriteFileAtomicFunc

func WriteFileAtomicFunc(filename string, perm os.FileMode, writeFunc func(f io.Writer) error) error

WriteFileAtomicFunc atomically writes a file, it achieves this by creating a temporary file and then moving it. writeFunc is the func that will write data to the file. This function is taken from

https://github.com/youtube/vitess/blob/master/go/ioutil2/ioutil.go

Copyright 2012, Google Inc. BSD-license, see licenses/LICENSE-BSD-3-Clause

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL