keps

package
v0.0.0-...-1c4df2c Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(contentRoot string, p string) (string, error)

Path returns the path to a possible KEP directory or an error if SIG routing information cannot be determined

example:

contentRoot := "/tmp/keps-sandbox/content"

(1)
kepDir, _ := Path(contentRoot, "large-value-delivered-incrementally")
println(kepDir) // /tmp/keps-sandbox/content/kubernetes-wide/large-value-delivered-incrementally

(2)
kepDir, _ := Path(contentRoot, "/tmp/keps-sandbox/content/large-value-delivered-incrementally")
println(kepDir) // /tmp/keps-sandbox/content/kubernetes-wide/large-value-delivered-incrementally

(3)
kepDir, _ := Path(contentRoot, "sig-node/functional-value-delivered-incrementally")
println(kepDir) // /tmp/keps-sandbox/content/sig-node/sig-wide/functional-value-delivered-incrementally

(4)
kepDir, _ := Path(contentRoot, "/tmp/keps-sandbox/content/sig-node/sig-wide/functional-value-delivered-incrementally")
println(kepDir) // /tmp/keps-sandbox/content/sig-node/sig-wide/functional-value-delivered-incrementally

(5)
kepDir, _ := Path(contentRoot, "sig-node/kubelet/kubelet-specific-value-delivered-incrementally")
println(kepDir) // /tmp/keps-sandbox/content/sig-node/kubelet/kubelet-specific-value-delivered-incrementally

(6)
kepDir, _ := Path(contentRoot, "/tmp/keps-sandbox/content/sig-node/kubelet/kubelet-specific-value-delivered-incrementally")
println(kepDir) // /tmp/keps-sandbox/content/sig-node/kubelet/kubelet-specific-value-delivered-incrementally

an absolute path is returned with the intention of using the result as input to standard
library calls to functions such as os.Open so that caller location is irrelevant

Types

type Instance

type Instance interface {
	UniqueID() string
	ShortID() int
	Title() string
	OwningSIG() string
	Authors() []string
	ContentDir() string
	State() states.Name
	Created() time.Time
	LastUpdated() time.Time
	Sections() []string

	// simple pass through mutators
	AddApprovers(...string)
	AddReviewers(...string)

	// heavy lifting mutators
	SetState(states.Name) error

	// consistency
	AddChecks(...check.That)
	Check() error

	// flush to disk
	Persist() error
}

func New

func New(meta metadata.KEP, existingEntries []sections.Entry) (Instance, error)

New creates a new Instance from a sections.Collection and a metadata.KEP

func Open

func Open(path string) (Instance, error)

Open returns an Instance based on information stored on disk at path

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
metadatafakes
Code generated by counterfeiter.
Code generated by counterfeiter.
sectionsfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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