api: introduce api/{types,services} for deduplication of API definition
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
parent
6527a57d7b
commit
bf8abef70f
37 changed files with 2179 additions and 1753 deletions
6
api/types/state/gen.go
Normal file
6
api/types/state/gen.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Code generated by tools/gen-gen-go.sh
|
||||
// DO NOT EDIT!
|
||||
|
||||
package state
|
||||
|
||||
//go:generate protoc -I.:/home/suda/gopath/src/github.com/docker/containerd/vendor:/home/suda/gopath/src/github.com/docker/containerd/vendor/github.com/gogo/protobuf:/home/suda/gopath/src/github.com/docker/containerd/../../..:/usr/local/include --gogoctrd_out=plugins=grpc,import_path=github.com/docker/containerd/api/types/state,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. state.proto
|
79
api/types/state/state.pb.go
Normal file
79
api/types/state/state.pb.go
Normal file
|
@ -0,0 +1,79 @@
|
|||
// Code generated by protoc-gen-gogo.
|
||||
// source: state.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
/*
|
||||
Package state is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
state.proto
|
||||
|
||||
It has these top-level messages:
|
||||
*/
|
||||
package state
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// At the moment we have same State type for Container and Process
|
||||
type State int32
|
||||
|
||||
const (
|
||||
State_UNKNOWN State = 0
|
||||
State_CREATED State = 1
|
||||
State_RUNNING State = 2
|
||||
State_STOPPED State = 3
|
||||
State_PAUSED State = 4
|
||||
)
|
||||
|
||||
var State_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "CREATED",
|
||||
2: "RUNNING",
|
||||
3: "STOPPED",
|
||||
4: "PAUSED",
|
||||
}
|
||||
var State_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"CREATED": 1,
|
||||
"RUNNING": 2,
|
||||
"STOPPED": 3,
|
||||
"PAUSED": 4,
|
||||
}
|
||||
|
||||
func (x State) String() string {
|
||||
return proto.EnumName(State_name, int32(x))
|
||||
}
|
||||
func (State) EnumDescriptor() ([]byte, []int) { return fileDescriptorState, []int{0} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("containerd.v1.types.State", State_name, State_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("state.proto", fileDescriptorState) }
|
||||
|
||||
var fileDescriptorState = []byte{
|
||||
// 159 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x2e, 0x49, 0x2c,
|
||||
0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4e, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc,
|
||||
0x4b, 0x2d, 0x4a, 0xd1, 0x2b, 0x33, 0xd4, 0x2b, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x72, 0xe7, 0x62,
|
||||
0x0d, 0x06, 0xa9, 0x11, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, 0xf7, 0x13, 0x60,
|
||||
0x00, 0x71, 0x9c, 0x83, 0x5c, 0x1d, 0x43, 0x5c, 0x5d, 0x04, 0x18, 0x41, 0x9c, 0xa0, 0x50, 0x3f,
|
||||
0x3f, 0x4f, 0x3f, 0x77, 0x01, 0x26, 0x10, 0x27, 0x38, 0xc4, 0x3f, 0x20, 0xc0, 0xd5, 0x45, 0x80,
|
||||
0x59, 0x88, 0x8b, 0x8b, 0x2d, 0xc0, 0x31, 0x34, 0xd8, 0xd5, 0x45, 0x80, 0xc5, 0x49, 0xe6, 0xc4,
|
||||
0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x3e, 0x3c, 0x94, 0x63, 0x6c, 0x78, 0x24, 0xc7, 0x78,
|
||||
0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x9d,
|
||||
0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xfd, 0xe3, 0xd8, 0x91, 0x00, 0x00, 0x00,
|
||||
}
|
12
api/types/state/state.proto
Normal file
12
api/types/state/state.proto
Normal file
|
@ -0,0 +1,12 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package containerd.v1.types;
|
||||
|
||||
// At the moment we have same State type for Container and Process
|
||||
enum State {
|
||||
UNKNOWN = 0;
|
||||
CREATED = 1;
|
||||
RUNNING = 2;
|
||||
STOPPED = 3;
|
||||
PAUSED = 4;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue