queries

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxConcurrentArtifactQueries = 100

MaxConcurrentArtifactQueries is the max number of concurrent artifact queries. 100 is a conservative value to ensure we don't run out of file descriptors locally. NOTE: If users complain this is too slow we could make this configurable

by env var, or perhaps lookup the max file descriptors via ulimit -n...

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactQuery

type ArtifactQuery struct {
	Client restful.HTTPClient
	User   sous.User
}

ArtifactQuery supports querying artifacts by their SourceID only.

func (*ArtifactQuery) ByID

ByID returns the single artifact matched by sid. It returns nil, nil if there is no match and no error determining that.

func (*ArtifactQuery) Exists

func (q *ArtifactQuery) Exists(sid sous.SourceID) (bool, error)

Exists returns true if the artifact exists. If it returns a non-nil error, the other return value is undefined, and it was not possible to determine if the artifact exists or not.

type Deployment

type Deployment struct {
	StateManager  sous.StateManager
	ArtifactQuery ArtifactQuery
}

Deployment supports querying deployments.

func (*Deployment) Result

Result returns all the deployments matched by f.

type DeploymentAttributeFilters

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

DeploymentAttributeFilters filters deployments based on their attributes.

func (*DeploymentAttributeFilters) AddFlags

func (f *DeploymentAttributeFilters) AddFlags(q *Deployment, fs *flag.FlagSet)

AddFlags adds the available filters from q as flags to fs.

func (*DeploymentAttributeFilters) UnpackFlags

func (f *DeploymentAttributeFilters) UnpackFlags(q *Deployment) error

UnpackFlags should be called after flag.Parse and sets the filters up accordingly, overwriting any currently setup filters.

type DeploymentFilters

type DeploymentFilters struct {
	AttributeFilters DeploymentAttributeFilters
}

DeploymentFilters is the argument that determines which deployments are returned by a query.

type DeploymentQueryResult

type DeploymentQueryResult struct {
	// Deployments is the final query result.
	Deployments sous.Deployments
}

DeploymentQueryResult is the result of the query.

Jump to

Keyboard shortcuts

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