Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
8f995f3b
Commit
8f995f3b
authored
Nov 18, 2015
by
vaikas-google
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce state of a resource to Resource in types. In prep for issues: 79, 80
parent
c51edede
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
types.go
manager/manager/types.go
+19
-1
No files found.
manager/manager/types.go
View file @
8f995f3b
...
...
@@ -84,7 +84,7 @@ func NewDeployment(name string, id int) *Deployment {
// DeploymentStatus is an enumeration type for the status of a deployment.
type
DeploymentStatus
string
// These constants implement the
d
eploymentStatus enumeration type.
// These constants implement the
D
eploymentStatus enumeration type.
const
(
CreatedStatus
DeploymentStatus
=
"Created"
DeletedStatus
DeploymentStatus
=
"Deleted"
...
...
@@ -140,6 +140,23 @@ type Configuration struct {
Resources
[]
*
Resource
`json:"resources"`
}
// ResourceStatus is an enumeration type for the status of a resource.
type
ResourceStatus
string
// These constants implement the resourceStatus enumeration type.
const
(
Created
ResourceStatus
=
"Created"
Failed
ResourceStatus
=
"Failed"
Aborted
ResourceStatus
=
"Aborted"
)
// ResourceState describes the state of a resource.
type
ResourceState
struct
{
Status
ResourceStatus
`json:"status"`
SelfLink
string
`json:"selflink,omitempty"`
Errors
[]
string
`json:"errors,omitempty"`
}
// Resource describes a resource in a configuration. A resource has
// a name, a type and a set of properties. The name and type are used
// to identify the resource in Kubernetes. The properties are passed
...
...
@@ -148,6 +165,7 @@ type Resource struct {
Name
string
`json:"name"`
Type
string
`json:"type"`
Properties
map
[
string
]
interface
{}
`json:"properties,omitempty"`
State
ResourceState
`json:"state"`
}
// TypeInstance defines the metadata for an instantiation of a template type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment