Documentation ¶
Overview ¶
Package buildnum contains stuff to do with generating build numbers.
Package buildnum contains stuff to do with generating build numbers.
Package buildnum contains stuff to do with generating build numbers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildNumberIssuer ¶
type BuildNumberIssuer interface { //Generate the next build number for the supplied pipeline. //Returns the build number, or the error that occurred. NextBuildNumber(pipeline kube.PipelineID) (string, error) }
BuildNumberIssuer generates build numbers for activities.
type HTTPBuildNumberServer ¶
type HTTPBuildNumberServer struct {
// contains filtered or unexported fields
}
HTTPBuildNumberServer runs an HTTP server to serve build numbers, similar to Prow's tot (https://github.com/kubernetes/test-infra/tree/master/prow/cmd/tot)
func NewHTTPBuildNumberServer ¶
func NewHTTPBuildNumberServer(bindAddress string, port int, issuer BuildNumberIssuer) *HTTPBuildNumberServer
NewHTTPBuildNumberServer creates a new, initialised HTTPBuildNumberServer. Use 'bindAddress' to control the address/interface the HTTP service will listen on; to listen on all interfaces (i.e. 0.0.0.0 or ::) provide a blank string. Build numbers will be generated using the specifed BuildNumberIssuer.
func (*HTTPBuildNumberServer) Start ¶
func (s *HTTPBuildNumberServer) Start() error
Start the HTTP server. This call will block until the server exits.
type PipelineActivityBuildNumGen ¶
type PipelineActivityBuildNumGen struct {
// contains filtered or unexported fields
}
PipelineActivityBuildNumGen generates build numbers backed by PipelineActivity K8S CRDs.
func NewCRDBuildNumGen ¶
func NewCRDBuildNumGen(activitiesGetter v1.PipelineActivityInterface) *PipelineActivityBuildNumGen
NewCRDBuildNumGen initialises a new PipelineActivityBuildNumGen that will use the supplied PipelineActivityInterface to query CRDs.
func (*PipelineActivityBuildNumGen) NextBuildNumber ¶
func (g *PipelineActivityBuildNumGen) NextBuildNumber(pipeline kube.PipelineID) (string, error)
NextBuildNumber returns the next build number for the specified pipeline ID, storing the sequence in K8S. Returns the build number, or an error if there is a problem with K8S resources.