blob: 4694849740ae44fb2fd710643c6fe99be61b5887 [file] [log] [blame]
David K. Bainbridgedf9df632016-07-07 18:47:46 -07001// Copyright 2016 Open Networking Laboratory
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
David K. Bainbridgef0da8732016-06-01 16:15:37 -070014package main
15
16type TaskStatus uint8
17
18const (
19 Pending TaskStatus = iota
20 Running
21 Complete
22 Failed
23)
24
25func (s TaskStatus) String() string {
26 switch s {
27 case Pending:
28 return "PENDING"
29 case Running:
30 return "RUNNING"
31 case Complete:
32 return "COMPLETE"
33 case Failed:
34 return "FAILED"
35 }
36 return "INVALID TASK STATUS"
37}