gitops

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitDirectory

type GitDirectory struct {
	// contains filtered or unexported fields
}

func NewGitDirectory

func NewGitDirectory(url, dir, branch string, interval time.Duration) *GitDirectory

func (*GitDirectory) Ready

func (d *GitDirectory) Ready() bool

func (*GitDirectory) StartLoop

func (d *GitDirectory) StartLoop()

func (*GitDirectory) WaitForUpdate

func (d *GitDirectory) WaitForUpdate() GitUpdate

type GitOpsStorage

type GitOpsStorage struct {
	storage.Storage
	// contains filtered or unexported fields
}

GitOpsStorage implements the storage interface for GitOps purposes

func NewGitOpsStorage

func NewGitOpsStorage(url, branch string) *GitOpsStorage

func (*GitOpsStorage) Ready

func (s *GitOpsStorage) Ready() bool

func (*GitOpsStorage) WaitForUpdate

func (s *GitOpsStorage) WaitForUpdate() UpdatedFiles

type GitRawStorage

type GitRawStorage struct {
	// contains filtered or unexported fields
}

func NewGitRawStorage

func NewGitRawStorage(gitDir, underlyingDir string) *GitRawStorage

func (*GitRawStorage) Delete

func (r *GitRawStorage) Delete(key string) error

func (*GitRawStorage) Exists

func (r *GitRawStorage) Exists(key string) bool

func (*GitRawStorage) List

func (r *GitRawStorage) List(parentKey string) ([]string, error)

func (*GitRawStorage) Read

func (r *GitRawStorage) Read(key string) ([]byte, error)

func (*GitRawStorage) Sync

func (r *GitRawStorage) Sync() (UpdatedFiles, error)

func (*GitRawStorage) Write

func (r *GitRawStorage) Write(key string, content []byte) error

type GitUpdate

type GitUpdate struct {
	Commit        string
	PersistentDir string
	RealDir       string
}

type UpdateType

type UpdateType string
const (
	UpdateTypeCreated UpdateType = "Created"
	UpdateTypeChanged UpdateType = "Changed"
	UpdateTypeDeleted UpdateType = "Deleted"
)

type UpdatedFile

type UpdatedFile struct {
	GitPath  string
	Type     UpdateType
	Checksum string
	APIType  *meta.APIType
}

type UpdatedFiles

type UpdatedFiles []*UpdatedFile

Jump to

Keyboard shortcuts

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