diff --git a/manifest/concur.go b/manifest/concur.go new file mode 100644 index 0000000..0493bbf --- /dev/null +++ b/manifest/concur.go @@ -0,0 +1,10 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Polyform License +// that can be found in the LICENSE file. + +package manifest + +// Concurrency limits pipeline concurrency. +type Concurrency struct { + Limit int `json:"limit,omitempty"` +} diff --git a/manifest/concur_test.go b/manifest/concur_test.go new file mode 100644 index 0000000..f0f6365 --- /dev/null +++ b/manifest/concur_test.go @@ -0,0 +1,5 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Polyform License +// that can be found in the LICENSE file. + +package manifest diff --git a/manifest/manifest.go b/manifest/manifest.go index db4b54e..2d15d1c 100644 --- a/manifest/manifest.go +++ b/manifest/manifest.go @@ -28,6 +28,12 @@ type ( GetName() string } + // ConcurrentResource is a resource with concurrency limits. + ConcurrentResource interface { + Resource + GetConcurrency() Concurrency + } + // DependantResource is a resoure with runtime dependencies. DependantResource interface { Resource