github.com/stackdocker/rkt@v0.10.1-0.20151109095037-1aa827478248/api/v1alpha/api.pb.go (about)

     1  // Code generated by protoc-gen-go.
     2  // source: api.proto
     3  // DO NOT EDIT!
     4  
     5  /*
     6  Package v1alpha is a generated protocol buffer package.
     7  
     8  It is generated from these files:
     9  	api.proto
    10  
    11  It has these top-level messages:
    12  	ImageFormat
    13  	Image
    14  	Network
    15  	App
    16  	Pod
    17  	KeyValue
    18  	PodFilter
    19  	ImageFilter
    20  	Info
    21  	Event
    22  	EventFilter
    23  	GetInfoRequest
    24  	GetInfoResponse
    25  	ListPodsRequest
    26  	ListPodsResponse
    27  	InspectPodRequest
    28  	InspectPodResponse
    29  	ListImagesRequest
    30  	ListImagesResponse
    31  	InspectImageRequest
    32  	InspectImageResponse
    33  	ListenEventsRequest
    34  	ListenEventsResponse
    35  	GetLogsRequest
    36  	GetLogsResponse
    37  */
    38  package v1alpha
    39  
    40  import proto "github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/proto"
    41  import fmt "fmt"
    42  import math "math"
    43  
    44  import (
    45  	context "github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/context"
    46  	grpc "github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc"
    47  )
    48  
    49  // Reference imports to suppress errors if they are not otherwise used.
    50  var _ = proto.Marshal
    51  var _ = fmt.Errorf
    52  var _ = math.Inf
    53  
    54  // ImageType defines the supported image type.
    55  type ImageType int32
    56  
    57  const (
    58  	ImageType_IMAGE_TYPE_UNDEFINED ImageType = 0
    59  	ImageType_IMAGE_TYPE_APPC      ImageType = 1
    60  	ImageType_IMAGE_TYPE_DOCKER    ImageType = 2
    61  	ImageType_IMAGE_TYPE_OCI       ImageType = 3
    62  )
    63  
    64  var ImageType_name = map[int32]string{
    65  	0: "IMAGE_TYPE_UNDEFINED",
    66  	1: "IMAGE_TYPE_APPC",
    67  	2: "IMAGE_TYPE_DOCKER",
    68  	3: "IMAGE_TYPE_OCI",
    69  }
    70  var ImageType_value = map[string]int32{
    71  	"IMAGE_TYPE_UNDEFINED": 0,
    72  	"IMAGE_TYPE_APPC":      1,
    73  	"IMAGE_TYPE_DOCKER":    2,
    74  	"IMAGE_TYPE_OCI":       3,
    75  }
    76  
    77  func (x ImageType) String() string {
    78  	return proto.EnumName(ImageType_name, int32(x))
    79  }
    80  
    81  // AppState defines the possible states of the app.
    82  type AppState int32
    83  
    84  const (
    85  	AppState_APP_STATE_UNDEFINED AppState = 0
    86  	AppState_APP_STATE_RUNNING   AppState = 1
    87  	AppState_APP_STATE_EXITED    AppState = 2
    88  )
    89  
    90  var AppState_name = map[int32]string{
    91  	0: "APP_STATE_UNDEFINED",
    92  	1: "APP_STATE_RUNNING",
    93  	2: "APP_STATE_EXITED",
    94  }
    95  var AppState_value = map[string]int32{
    96  	"APP_STATE_UNDEFINED": 0,
    97  	"APP_STATE_RUNNING":   1,
    98  	"APP_STATE_EXITED":    2,
    99  }
   100  
   101  func (x AppState) String() string {
   102  	return proto.EnumName(AppState_name, int32(x))
   103  }
   104  
   105  // PodState defines the possible states of the pod.
   106  // See https://github.com/coreos/rkt/blob/master/Documentation/devel/pod-lifecycle.md for a detailed
   107  // explanation of each state.
   108  type PodState int32
   109  
   110  const (
   111  	PodState_POD_STATE_UNDEFINED PodState = 0
   112  	// States before the pod is running.
   113  	PodState_POD_STATE_EMBRYO    PodState = 1
   114  	PodState_POD_STATE_PREPARING PodState = 2
   115  	PodState_POD_STATE_PREPARED  PodState = 3
   116  	// State that indicates the pod is running.
   117  	PodState_POD_STATE_RUNNING PodState = 4
   118  	// States that indicates the pod is exited, and will never run.
   119  	PodState_POD_STATE_ABORTED_PREPARE PodState = 5
   120  	PodState_POD_STATE_EXITED          PodState = 6
   121  	PodState_POD_STATE_DELETING        PodState = 7
   122  	PodState_POD_STATE_GARBAGE         PodState = 8
   123  )
   124  
   125  var PodState_name = map[int32]string{
   126  	0: "POD_STATE_UNDEFINED",
   127  	1: "POD_STATE_EMBRYO",
   128  	2: "POD_STATE_PREPARING",
   129  	3: "POD_STATE_PREPARED",
   130  	4: "POD_STATE_RUNNING",
   131  	5: "POD_STATE_ABORTED_PREPARE",
   132  	6: "POD_STATE_EXITED",
   133  	7: "POD_STATE_DELETING",
   134  	8: "POD_STATE_GARBAGE",
   135  }
   136  var PodState_value = map[string]int32{
   137  	"POD_STATE_UNDEFINED":       0,
   138  	"POD_STATE_EMBRYO":          1,
   139  	"POD_STATE_PREPARING":       2,
   140  	"POD_STATE_PREPARED":        3,
   141  	"POD_STATE_RUNNING":         4,
   142  	"POD_STATE_ABORTED_PREPARE": 5,
   143  	"POD_STATE_EXITED":          6,
   144  	"POD_STATE_DELETING":        7,
   145  	"POD_STATE_GARBAGE":         8,
   146  }
   147  
   148  func (x PodState) String() string {
   149  	return proto.EnumName(PodState_name, int32(x))
   150  }
   151  
   152  // EventType defines the type of the events that will be received via ListenEvents().
   153  type EventType int32
   154  
   155  const (
   156  	EventType_EVENT_TYPE_UNDEFINED EventType = 0
   157  	// Pod events.
   158  	EventType_EVENT_TYPE_POD_PREPARED          EventType = 1
   159  	EventType_EVENT_TYPE_POD_PREPARE_ABORTED   EventType = 2
   160  	EventType_EVENT_TYPE_POD_STARTED           EventType = 3
   161  	EventType_EVENT_TYPE_POD_EXITED            EventType = 4
   162  	EventType_EVENT_TYPE_POD_GARBAGE_COLLECTED EventType = 5
   163  	// App events.
   164  	EventType_EVENT_TYPE_APP_STARTED EventType = 6
   165  	EventType_EVENT_TYPE_APP_EXITED  EventType = 7
   166  	// Image events.
   167  	EventType_EVENT_TYPE_IMAGE_IMPORTED EventType = 8
   168  	EventType_EVENT_TYPE_IMAGE_REMOVED  EventType = 9
   169  )
   170  
   171  var EventType_name = map[int32]string{
   172  	0: "EVENT_TYPE_UNDEFINED",
   173  	1: "EVENT_TYPE_POD_PREPARED",
   174  	2: "EVENT_TYPE_POD_PREPARE_ABORTED",
   175  	3: "EVENT_TYPE_POD_STARTED",
   176  	4: "EVENT_TYPE_POD_EXITED",
   177  	5: "EVENT_TYPE_POD_GARBAGE_COLLECTED",
   178  	6: "EVENT_TYPE_APP_STARTED",
   179  	7: "EVENT_TYPE_APP_EXITED",
   180  	8: "EVENT_TYPE_IMAGE_IMPORTED",
   181  	9: "EVENT_TYPE_IMAGE_REMOVED",
   182  }
   183  var EventType_value = map[string]int32{
   184  	"EVENT_TYPE_UNDEFINED":             0,
   185  	"EVENT_TYPE_POD_PREPARED":          1,
   186  	"EVENT_TYPE_POD_PREPARE_ABORTED":   2,
   187  	"EVENT_TYPE_POD_STARTED":           3,
   188  	"EVENT_TYPE_POD_EXITED":            4,
   189  	"EVENT_TYPE_POD_GARBAGE_COLLECTED": 5,
   190  	"EVENT_TYPE_APP_STARTED":           6,
   191  	"EVENT_TYPE_APP_EXITED":            7,
   192  	"EVENT_TYPE_IMAGE_IMPORTED":        8,
   193  	"EVENT_TYPE_IMAGE_REMOVED":         9,
   194  }
   195  
   196  func (x EventType) String() string {
   197  	return proto.EnumName(EventType_name, int32(x))
   198  }
   199  
   200  // ImageFormat defines the format of the image.
   201  type ImageFormat struct {
   202  	// Type of the image, required.
   203  	Type ImageType `protobuf:"varint,1,opt,name=type,enum=v1alpha.ImageType" json:"type,omitempty"`
   204  	// Version of the image format, required.
   205  	Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
   206  }
   207  
   208  func (m *ImageFormat) Reset()         { *m = ImageFormat{} }
   209  func (m *ImageFormat) String() string { return proto.CompactTextString(m) }
   210  func (*ImageFormat) ProtoMessage()    {}
   211  
   212  // Image describes the image's information.
   213  type Image struct {
   214  	// Base format of the image, required. This indicates the original format
   215  	// for the image as nowadays all the image formats will be transformed to
   216  	// ACI.
   217  	BaseFormat *ImageFormat `protobuf:"bytes,1,opt,name=base_format" json:"base_format,omitempty"`
   218  	// ID of the image, a string that can be used to uniquely identify the image,
   219  	// e.g. sha512 hash of the ACIs, required.
   220  	Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
   221  	// Name of the image in the image manifest, e.g. 'coreos.com/etcd', optional.
   222  	Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
   223  	// Version of the image, e.g. 'latest', '2.0.10', optional.
   224  	Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
   225  	// Timestamp of when the image is imported, it is the seconds since epoch, optional.
   226  	ImportTimestamp int64 `protobuf:"varint,5,opt,name=import_timestamp" json:"import_timestamp,omitempty"`
   227  	// JSON-encoded byte array that represents the image manifest, optional.
   228  	Manifest []byte `protobuf:"bytes,6,opt,name=manifest,proto3" json:"manifest,omitempty"`
   229  }
   230  
   231  func (m *Image) Reset()         { *m = Image{} }
   232  func (m *Image) String() string { return proto.CompactTextString(m) }
   233  func (*Image) ProtoMessage()    {}
   234  
   235  func (m *Image) GetBaseFormat() *ImageFormat {
   236  	if m != nil {
   237  		return m.BaseFormat
   238  	}
   239  	return nil
   240  }
   241  
   242  // Network describes the network information of a pod.
   243  type Network struct {
   244  	// Name of the network that a pod belongs to, required.
   245  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
   246  	// Pod's IPv4 address within the network, optional if IPv6 address is given.
   247  	Ipv4 string `protobuf:"bytes,2,opt,name=ipv4" json:"ipv4,omitempty"`
   248  	// Pod's IPv6 address within the network, optional if IPv4 address is given.
   249  	Ipv6 string `protobuf:"bytes,3,opt,name=ipv6" json:"ipv6,omitempty"`
   250  }
   251  
   252  func (m *Network) Reset()         { *m = Network{} }
   253  func (m *Network) String() string { return proto.CompactTextString(m) }
   254  func (*Network) ProtoMessage()    {}
   255  
   256  // App describes the information of an app that's running in a pod.
   257  type App struct {
   258  	// Name of the app, required.
   259  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
   260  	// Image used by the app, required. However, this may only contain the image id
   261  	// if it is returned by ListPods().
   262  	Image *Image `protobuf:"bytes,2,opt,name=image" json:"image,omitempty"`
   263  	// State of the app. optional, non-empty only if it's returned by InspectPod().
   264  	State AppState `protobuf:"varint,3,opt,name=state,enum=v1alpha.AppState" json:"state,omitempty"`
   265  	// Exit code of the app. optional, only valid if it's returned by InspectPod() and
   266  	// the app has already exited.
   267  	ExitCode int32 `protobuf:"zigzag32,4,opt,name=exit_code" json:"exit_code,omitempty"`
   268  }
   269  
   270  func (m *App) Reset()         { *m = App{} }
   271  func (m *App) String() string { return proto.CompactTextString(m) }
   272  func (*App) ProtoMessage()    {}
   273  
   274  func (m *App) GetImage() *Image {
   275  	if m != nil {
   276  		return m.Image
   277  	}
   278  	return nil
   279  }
   280  
   281  // Pod describes a pod's information.
   282  type Pod struct {
   283  	// ID of the pod, in the form of a UUID, required.
   284  	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
   285  	// PID of the pod, optional, only valid if it's returned by InspectPod(). A negative value means the pod has exited.
   286  	Pid int32 `protobuf:"zigzag32,2,opt,name=pid" json:"pid,omitempty"`
   287  	// State of the pod, required.
   288  	State PodState `protobuf:"varint,3,opt,name=state,enum=v1alpha.PodState" json:"state,omitempty"`
   289  	// List of apps in the pod, required.
   290  	Apps []*App `protobuf:"bytes,4,rep,name=apps" json:"apps,omitempty"`
   291  	// Network information of the pod, optional, non-empty if the pod is running in private net.
   292  	// Note that a pod can be in multiple networks.
   293  	Networks []*Network `protobuf:"bytes,5,rep,name=networks" json:"networks,omitempty"`
   294  	// JSON-encoded byte array that represents the pod manifest of the pod, required.
   295  	Manifest []byte `protobuf:"bytes,6,opt,name=manifest,proto3" json:"manifest,omitempty"`
   296  }
   297  
   298  func (m *Pod) Reset()         { *m = Pod{} }
   299  func (m *Pod) String() string { return proto.CompactTextString(m) }
   300  func (*Pod) ProtoMessage()    {}
   301  
   302  func (m *Pod) GetApps() []*App {
   303  	if m != nil {
   304  		return m.Apps
   305  	}
   306  	return nil
   307  }
   308  
   309  func (m *Pod) GetNetworks() []*Network {
   310  	if m != nil {
   311  		return m.Networks
   312  	}
   313  	return nil
   314  }
   315  
   316  type KeyValue struct {
   317  	// Key part of the key-value pair.
   318  	Key string `protobuf:"bytes,1,opt" json:"Key,omitempty"`
   319  	// Value part of the key-value pair.
   320  	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
   321  }
   322  
   323  func (m *KeyValue) Reset()         { *m = KeyValue{} }
   324  func (m *KeyValue) String() string { return proto.CompactTextString(m) }
   325  func (*KeyValue) ProtoMessage()    {}
   326  
   327  // PodFilter defines the condition that the returned pods need to satisfy in ListPods().
   328  // The conditions are combined by 'AND'.
   329  type PodFilter struct {
   330  	// If not empty, the pods that have any of the ids will be returned.
   331  	Ids []string `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"`
   332  	// If not empty, the pods that have any of the states will be returned.
   333  	States []PodState `protobuf:"varint,2,rep,name=states,enum=v1alpha.PodState" json:"states,omitempty"`
   334  	// If not empty, the pods that have any of the apps will be returned.
   335  	AppNames []string `protobuf:"bytes,3,rep,name=app_names" json:"app_names,omitempty"`
   336  	// If not empty, the pods that have any of the images(in the apps) will be returned
   337  	ImageIds []string `protobuf:"bytes,4,rep,name=image_ids" json:"image_ids,omitempty"`
   338  	// If not empty, the pods that are in any of the networks will be returned.
   339  	NetworkNames []string `protobuf:"bytes,5,rep,name=network_names" json:"network_names,omitempty"`
   340  	// If not empty, the pods that have any of the annotations will be returned.
   341  	Annotations []*KeyValue `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty"`
   342  }
   343  
   344  func (m *PodFilter) Reset()         { *m = PodFilter{} }
   345  func (m *PodFilter) String() string { return proto.CompactTextString(m) }
   346  func (*PodFilter) ProtoMessage()    {}
   347  
   348  func (m *PodFilter) GetAnnotations() []*KeyValue {
   349  	if m != nil {
   350  		return m.Annotations
   351  	}
   352  	return nil
   353  }
   354  
   355  // ImageFilter defines the condition that the returned images need to satisfy in ListImages().
   356  // The conditions are combined by 'AND'.
   357  type ImageFilter struct {
   358  	// If not empty, the images that have any of the ids will be returned.
   359  	Ids []string `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"`
   360  	// if not empty, the images that have any of the prefixes in the name will be returned.
   361  	Prefixes []string `protobuf:"bytes,2,rep,name=prefixes" json:"prefixes,omitempty"`
   362  	// If not empty, the images that have any of the base names will be returned.
   363  	// For example, both 'coreos.com/etcd' and 'k8s.io/etcd' will be returned if 'etcd' is included,
   364  	// however 'k8s.io/etcd-backup' will not be returned.
   365  	BaseNames []string `protobuf:"bytes,3,rep,name=base_names" json:"base_names,omitempty"`
   366  	// If not empty, the images that have any of the keywords in the name will be returned.
   367  	// For example, both 'kubernetes-etcd', 'etcd:latest' will be returned if 'etcd' is included,
   368  	Keywords []string `protobuf:"bytes,4,rep,name=keywords" json:"keywords,omitempty"`
   369  	// If not empty, the images that have any of the labels will be returned.
   370  	Labels []*KeyValue `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty"`
   371  	// If set, the images that are imported after this timestamp will be returned.
   372  	ImportedAfter int64 `protobuf:"varint,6,opt,name=imported_after" json:"imported_after,omitempty"`
   373  	// If set, the images that are imported before this timestamp will be returned.
   374  	ImportedBefore int64 `protobuf:"varint,7,opt,name=imported_before" json:"imported_before,omitempty"`
   375  	// If not empty, the images that have any of the annotations will be returned.
   376  	Annotations []*KeyValue `protobuf:"bytes,8,rep,name=annotations" json:"annotations,omitempty"`
   377  }
   378  
   379  func (m *ImageFilter) Reset()         { *m = ImageFilter{} }
   380  func (m *ImageFilter) String() string { return proto.CompactTextString(m) }
   381  func (*ImageFilter) ProtoMessage()    {}
   382  
   383  func (m *ImageFilter) GetLabels() []*KeyValue {
   384  	if m != nil {
   385  		return m.Labels
   386  	}
   387  	return nil
   388  }
   389  
   390  func (m *ImageFilter) GetAnnotations() []*KeyValue {
   391  	if m != nil {
   392  		return m.Annotations
   393  	}
   394  	return nil
   395  }
   396  
   397  // Info describes the information of rkt on the machine.
   398  type Info struct {
   399  	// Version of rkt, required, in the form of Semantic Versioning 2.0.0 (http://semver.org/).
   400  	RktVersion string `protobuf:"bytes,1,opt,name=rkt_version" json:"rkt_version,omitempty"`
   401  	// Version of appc, required, in the form of Semantic Versioning 2.0.0 (http://semver.org/).
   402  	AppcVersion string `protobuf:"bytes,2,opt,name=appc_version" json:"appc_version,omitempty"`
   403  	// Latest version of the api that's supported by the service, required, in the form of Semantic Versioning 2.0.0 (http://semver.org/).
   404  	ApiVersion string `protobuf:"bytes,3,opt,name=api_version" json:"api_version,omitempty"`
   405  }
   406  
   407  func (m *Info) Reset()         { *m = Info{} }
   408  func (m *Info) String() string { return proto.CompactTextString(m) }
   409  func (*Info) ProtoMessage()    {}
   410  
   411  // Event describes the events that will be received via ListenEvents().
   412  type Event struct {
   413  	// Type of the event, required.
   414  	Type EventType `protobuf:"varint,1,opt,name=type,enum=v1alpha.EventType" json:"type,omitempty"`
   415  	// ID of the subject that causes the event, required.
   416  	// If the event is a pod or app event, the id is the pod's uuid.
   417  	// If the event is an image event, the id is the image's id.
   418  	Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
   419  	// Name of the subject that causes the event, required.
   420  	// If the event is a pod event, the name is the pod's name.
   421  	// If the event is an app event, the name is the app's name.
   422  	// If the event is an image event, the name is the image's name.
   423  	From string `protobuf:"bytes,3,opt,name=from" json:"from,omitempty"`
   424  	// Timestamp of when the event happens, it is the seconds since epoch, required.
   425  	Time int64 `protobuf:"varint,4,opt,name=time" json:"time,omitempty"`
   426  	// Data of the event, in the form of key-value pairs, optional.
   427  	Data []*KeyValue `protobuf:"bytes,5,rep,name=data" json:"data,omitempty"`
   428  }
   429  
   430  func (m *Event) Reset()         { *m = Event{} }
   431  func (m *Event) String() string { return proto.CompactTextString(m) }
   432  func (*Event) ProtoMessage()    {}
   433  
   434  func (m *Event) GetData() []*KeyValue {
   435  	if m != nil {
   436  		return m.Data
   437  	}
   438  	return nil
   439  }
   440  
   441  // EventFilter defines the condition that the returned events needs to satisfy in ListImages().
   442  // The condition are combined by 'AND'.
   443  type EventFilter struct {
   444  	// If not empty, then only returns the events that have the listed types.
   445  	Types []EventType `protobuf:"varint,1,rep,name=types,enum=v1alpha.EventType" json:"types,omitempty"`
   446  	// If not empty, then only returns the events whose 'id' is included in the listed ids.
   447  	Ids []string `protobuf:"bytes,2,rep,name=ids" json:"ids,omitempty"`
   448  	// If not empty, then only returns the events whose 'from' is included in the listed names.
   449  	Names []string `protobuf:"bytes,3,rep,name=names" json:"names,omitempty"`
   450  	// If set, then only returns the events after this timestamp.
   451  	// If the server starts after since_time, then only the events happened after the start of the server will be returned.
   452  	// If since_time is a future timestamp, then no events will be returned until that time.
   453  	SinceTime int64 `protobuf:"varint,4,opt,name=since_time" json:"since_time,omitempty"`
   454  	// If set, then only returns the events before this timestamp.
   455  	// If it is a future timestamp, then the event stream will be closed at that moment.
   456  	UntilTime int64 `protobuf:"varint,5,opt,name=until_time" json:"until_time,omitempty"`
   457  }
   458  
   459  func (m *EventFilter) Reset()         { *m = EventFilter{} }
   460  func (m *EventFilter) String() string { return proto.CompactTextString(m) }
   461  func (*EventFilter) ProtoMessage()    {}
   462  
   463  // Request for GetInfo().
   464  type GetInfoRequest struct {
   465  }
   466  
   467  func (m *GetInfoRequest) Reset()         { *m = GetInfoRequest{} }
   468  func (m *GetInfoRequest) String() string { return proto.CompactTextString(m) }
   469  func (*GetInfoRequest) ProtoMessage()    {}
   470  
   471  // Response for GetInfo().
   472  type GetInfoResponse struct {
   473  	Info *Info `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"`
   474  }
   475  
   476  func (m *GetInfoResponse) Reset()         { *m = GetInfoResponse{} }
   477  func (m *GetInfoResponse) String() string { return proto.CompactTextString(m) }
   478  func (*GetInfoResponse) ProtoMessage()    {}
   479  
   480  func (m *GetInfoResponse) GetInfo() *Info {
   481  	if m != nil {
   482  		return m.Info
   483  	}
   484  	return nil
   485  }
   486  
   487  // Request for ListPods().
   488  type ListPodsRequest struct {
   489  	Filter *PodFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
   490  }
   491  
   492  func (m *ListPodsRequest) Reset()         { *m = ListPodsRequest{} }
   493  func (m *ListPodsRequest) String() string { return proto.CompactTextString(m) }
   494  func (*ListPodsRequest) ProtoMessage()    {}
   495  
   496  func (m *ListPodsRequest) GetFilter() *PodFilter {
   497  	if m != nil {
   498  		return m.Filter
   499  	}
   500  	return nil
   501  }
   502  
   503  // Response for ListPods().
   504  type ListPodsResponse struct {
   505  	Pods []*Pod `protobuf:"bytes,1,rep,name=pods" json:"pods,omitempty"`
   506  }
   507  
   508  func (m *ListPodsResponse) Reset()         { *m = ListPodsResponse{} }
   509  func (m *ListPodsResponse) String() string { return proto.CompactTextString(m) }
   510  func (*ListPodsResponse) ProtoMessage()    {}
   511  
   512  func (m *ListPodsResponse) GetPods() []*Pod {
   513  	if m != nil {
   514  		return m.Pods
   515  	}
   516  	return nil
   517  }
   518  
   519  // Request for InspectPod().
   520  type InspectPodRequest struct {
   521  	// ID of the pod which we are querying status for, required.
   522  	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
   523  }
   524  
   525  func (m *InspectPodRequest) Reset()         { *m = InspectPodRequest{} }
   526  func (m *InspectPodRequest) String() string { return proto.CompactTextString(m) }
   527  func (*InspectPodRequest) ProtoMessage()    {}
   528  
   529  // Response for InspectPod().
   530  type InspectPodResponse struct {
   531  	Pod *Pod `protobuf:"bytes,1,opt,name=pod" json:"pod,omitempty"`
   532  }
   533  
   534  func (m *InspectPodResponse) Reset()         { *m = InspectPodResponse{} }
   535  func (m *InspectPodResponse) String() string { return proto.CompactTextString(m) }
   536  func (*InspectPodResponse) ProtoMessage()    {}
   537  
   538  func (m *InspectPodResponse) GetPod() *Pod {
   539  	if m != nil {
   540  		return m.Pod
   541  	}
   542  	return nil
   543  }
   544  
   545  // Request for ListImages().
   546  type ListImagesRequest struct {
   547  	Filter *ImageFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
   548  }
   549  
   550  func (m *ListImagesRequest) Reset()         { *m = ListImagesRequest{} }
   551  func (m *ListImagesRequest) String() string { return proto.CompactTextString(m) }
   552  func (*ListImagesRequest) ProtoMessage()    {}
   553  
   554  func (m *ListImagesRequest) GetFilter() *ImageFilter {
   555  	if m != nil {
   556  		return m.Filter
   557  	}
   558  	return nil
   559  }
   560  
   561  // Response for ListImages().
   562  type ListImagesResponse struct {
   563  	Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"`
   564  }
   565  
   566  func (m *ListImagesResponse) Reset()         { *m = ListImagesResponse{} }
   567  func (m *ListImagesResponse) String() string { return proto.CompactTextString(m) }
   568  func (*ListImagesResponse) ProtoMessage()    {}
   569  
   570  func (m *ListImagesResponse) GetImages() []*Image {
   571  	if m != nil {
   572  		return m.Images
   573  	}
   574  	return nil
   575  }
   576  
   577  // Request for InspectImage().
   578  type InspectImageRequest struct {
   579  	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
   580  }
   581  
   582  func (m *InspectImageRequest) Reset()         { *m = InspectImageRequest{} }
   583  func (m *InspectImageRequest) String() string { return proto.CompactTextString(m) }
   584  func (*InspectImageRequest) ProtoMessage()    {}
   585  
   586  // Response for InspectImage().
   587  type InspectImageResponse struct {
   588  	Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
   589  }
   590  
   591  func (m *InspectImageResponse) Reset()         { *m = InspectImageResponse{} }
   592  func (m *InspectImageResponse) String() string { return proto.CompactTextString(m) }
   593  func (*InspectImageResponse) ProtoMessage()    {}
   594  
   595  func (m *InspectImageResponse) GetImage() *Image {
   596  	if m != nil {
   597  		return m.Image
   598  	}
   599  	return nil
   600  }
   601  
   602  // Request for ListenEvents().
   603  type ListenEventsRequest struct {
   604  	Filter *EventFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
   605  }
   606  
   607  func (m *ListenEventsRequest) Reset()         { *m = ListenEventsRequest{} }
   608  func (m *ListenEventsRequest) String() string { return proto.CompactTextString(m) }
   609  func (*ListenEventsRequest) ProtoMessage()    {}
   610  
   611  func (m *ListenEventsRequest) GetFilter() *EventFilter {
   612  	if m != nil {
   613  		return m.Filter
   614  	}
   615  	return nil
   616  }
   617  
   618  // Response for ListenEvents().
   619  type ListenEventsResponse struct {
   620  	// Aggregate multiple events to reduce round trips, optional as the response can contain no events.
   621  	Events []*Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
   622  }
   623  
   624  func (m *ListenEventsResponse) Reset()         { *m = ListenEventsResponse{} }
   625  func (m *ListenEventsResponse) String() string { return proto.CompactTextString(m) }
   626  func (*ListenEventsResponse) ProtoMessage()    {}
   627  
   628  func (m *ListenEventsResponse) GetEvents() []*Event {
   629  	if m != nil {
   630  		return m.Events
   631  	}
   632  	return nil
   633  }
   634  
   635  // Request for GetLogs().
   636  type GetLogsRequest struct {
   637  	// ID of the pod which we will get logs from, required.
   638  	PodId string `protobuf:"bytes,1,opt,name=pod_id" json:"pod_id,omitempty"`
   639  	// Name of the app within the pod which we will get logs
   640  	// from, optional. If not set, then the logs of all the
   641  	// apps within the pod will be returned.
   642  	AppName string `protobuf:"bytes,2,opt,name=app_name" json:"app_name,omitempty"`
   643  	// Number of most recent lines to return, optional.
   644  	Lines int32 `protobuf:"varint,3,opt,name=lines" json:"lines,omitempty"`
   645  	// If true, then a response stream will not be closed,
   646  	// and new log response will be sent via the stream, default is false.
   647  	Follow bool `protobuf:"varint,4,opt,name=follow" json:"follow,omitempty"`
   648  	// If set, then only the logs after the timestamp will
   649  	// be returned, optional.
   650  	SinceTime int64 `protobuf:"varint,5,opt,name=since_time" json:"since_time,omitempty"`
   651  	// If set, then only the logs before the timestamp will
   652  	// be returned, optional.
   653  	UntilTime int64 `protobuf:"varint,6,opt,name=until_time" json:"until_time,omitempty"`
   654  }
   655  
   656  func (m *GetLogsRequest) Reset()         { *m = GetLogsRequest{} }
   657  func (m *GetLogsRequest) String() string { return proto.CompactTextString(m) }
   658  func (*GetLogsRequest) ProtoMessage()    {}
   659  
   660  // Response for GetLogs().
   661  type GetLogsResponse struct {
   662  	// List of the log lines that returned, optional as the response can contain no logs.
   663  	Lines []string `protobuf:"bytes,1,rep,name=lines" json:"lines,omitempty"`
   664  }
   665  
   666  func (m *GetLogsResponse) Reset()         { *m = GetLogsResponse{} }
   667  func (m *GetLogsResponse) String() string { return proto.CompactTextString(m) }
   668  func (*GetLogsResponse) ProtoMessage()    {}
   669  
   670  func init() {
   671  	proto.RegisterEnum("v1alpha.ImageType", ImageType_name, ImageType_value)
   672  	proto.RegisterEnum("v1alpha.AppState", AppState_name, AppState_value)
   673  	proto.RegisterEnum("v1alpha.PodState", PodState_name, PodState_value)
   674  	proto.RegisterEnum("v1alpha.EventType", EventType_name, EventType_value)
   675  }
   676  
   677  // Reference imports to suppress errors if they are not otherwise used.
   678  var _ context.Context
   679  var _ grpc.ClientConn
   680  
   681  // Client API for PublicAPI service
   682  
   683  type PublicAPIClient interface {
   684  	// GetInfo gets the rkt's information on the machine.
   685  	GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
   686  	// ListPods lists rkt pods on the machine.
   687  	ListPods(ctx context.Context, in *ListPodsRequest, opts ...grpc.CallOption) (*ListPodsResponse, error)
   688  	// InspectPod gets detailed pod information of the specified pod.
   689  	InspectPod(ctx context.Context, in *InspectPodRequest, opts ...grpc.CallOption) (*InspectPodResponse, error)
   690  	// ListImages lists the images on the machine.
   691  	ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error)
   692  	// InspectImage gets the detailed image information of the specified image.
   693  	InspectImage(ctx context.Context, in *InspectImageRequest, opts ...grpc.CallOption) (*InspectImageResponse, error)
   694  	// ListenEvents listens for the events, it will return a response stream
   695  	// that will contain event objects.
   696  	ListenEvents(ctx context.Context, in *ListenEventsRequest, opts ...grpc.CallOption) (PublicAPI_ListenEventsClient, error)
   697  	// GetLogs gets the logs for a pod, if the app is also specified, then only the logs
   698  	// of the app will be returned.
   699  	//
   700  	// If 'follow' in the 'GetLogsRequest' is set to 'true', then the response stream
   701  	// will not be closed after the first response, the future logs will be sent via
   702  	// the stream.
   703  	GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (PublicAPI_GetLogsClient, error)
   704  }
   705  
   706  type publicAPIClient struct {
   707  	cc *grpc.ClientConn
   708  }
   709  
   710  func NewPublicAPIClient(cc *grpc.ClientConn) PublicAPIClient {
   711  	return &publicAPIClient{cc}
   712  }
   713  
   714  func (c *publicAPIClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) {
   715  	out := new(GetInfoResponse)
   716  	err := grpc.Invoke(ctx, "/v1alpha.PublicAPI/GetInfo", in, out, c.cc, opts...)
   717  	if err != nil {
   718  		return nil, err
   719  	}
   720  	return out, nil
   721  }
   722  
   723  func (c *publicAPIClient) ListPods(ctx context.Context, in *ListPodsRequest, opts ...grpc.CallOption) (*ListPodsResponse, error) {
   724  	out := new(ListPodsResponse)
   725  	err := grpc.Invoke(ctx, "/v1alpha.PublicAPI/ListPods", in, out, c.cc, opts...)
   726  	if err != nil {
   727  		return nil, err
   728  	}
   729  	return out, nil
   730  }
   731  
   732  func (c *publicAPIClient) InspectPod(ctx context.Context, in *InspectPodRequest, opts ...grpc.CallOption) (*InspectPodResponse, error) {
   733  	out := new(InspectPodResponse)
   734  	err := grpc.Invoke(ctx, "/v1alpha.PublicAPI/InspectPod", in, out, c.cc, opts...)
   735  	if err != nil {
   736  		return nil, err
   737  	}
   738  	return out, nil
   739  }
   740  
   741  func (c *publicAPIClient) ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) {
   742  	out := new(ListImagesResponse)
   743  	err := grpc.Invoke(ctx, "/v1alpha.PublicAPI/ListImages", in, out, c.cc, opts...)
   744  	if err != nil {
   745  		return nil, err
   746  	}
   747  	return out, nil
   748  }
   749  
   750  func (c *publicAPIClient) InspectImage(ctx context.Context, in *InspectImageRequest, opts ...grpc.CallOption) (*InspectImageResponse, error) {
   751  	out := new(InspectImageResponse)
   752  	err := grpc.Invoke(ctx, "/v1alpha.PublicAPI/InspectImage", in, out, c.cc, opts...)
   753  	if err != nil {
   754  		return nil, err
   755  	}
   756  	return out, nil
   757  }
   758  
   759  func (c *publicAPIClient) ListenEvents(ctx context.Context, in *ListenEventsRequest, opts ...grpc.CallOption) (PublicAPI_ListenEventsClient, error) {
   760  	stream, err := grpc.NewClientStream(ctx, &_PublicAPI_serviceDesc.Streams[0], c.cc, "/v1alpha.PublicAPI/ListenEvents", opts...)
   761  	if err != nil {
   762  		return nil, err
   763  	}
   764  	x := &publicAPIListenEventsClient{stream}
   765  	if err := x.ClientStream.SendMsg(in); err != nil {
   766  		return nil, err
   767  	}
   768  	if err := x.ClientStream.CloseSend(); err != nil {
   769  		return nil, err
   770  	}
   771  	return x, nil
   772  }
   773  
   774  type PublicAPI_ListenEventsClient interface {
   775  	Recv() (*ListenEventsResponse, error)
   776  	grpc.ClientStream
   777  }
   778  
   779  type publicAPIListenEventsClient struct {
   780  	grpc.ClientStream
   781  }
   782  
   783  func (x *publicAPIListenEventsClient) Recv() (*ListenEventsResponse, error) {
   784  	m := new(ListenEventsResponse)
   785  	if err := x.ClientStream.RecvMsg(m); err != nil {
   786  		return nil, err
   787  	}
   788  	return m, nil
   789  }
   790  
   791  func (c *publicAPIClient) GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (PublicAPI_GetLogsClient, error) {
   792  	stream, err := grpc.NewClientStream(ctx, &_PublicAPI_serviceDesc.Streams[1], c.cc, "/v1alpha.PublicAPI/GetLogs", opts...)
   793  	if err != nil {
   794  		return nil, err
   795  	}
   796  	x := &publicAPIGetLogsClient{stream}
   797  	if err := x.ClientStream.SendMsg(in); err != nil {
   798  		return nil, err
   799  	}
   800  	if err := x.ClientStream.CloseSend(); err != nil {
   801  		return nil, err
   802  	}
   803  	return x, nil
   804  }
   805  
   806  type PublicAPI_GetLogsClient interface {
   807  	Recv() (*GetLogsResponse, error)
   808  	grpc.ClientStream
   809  }
   810  
   811  type publicAPIGetLogsClient struct {
   812  	grpc.ClientStream
   813  }
   814  
   815  func (x *publicAPIGetLogsClient) Recv() (*GetLogsResponse, error) {
   816  	m := new(GetLogsResponse)
   817  	if err := x.ClientStream.RecvMsg(m); err != nil {
   818  		return nil, err
   819  	}
   820  	return m, nil
   821  }
   822  
   823  // Server API for PublicAPI service
   824  
   825  type PublicAPIServer interface {
   826  	// GetInfo gets the rkt's information on the machine.
   827  	GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
   828  	// ListPods lists rkt pods on the machine.
   829  	ListPods(context.Context, *ListPodsRequest) (*ListPodsResponse, error)
   830  	// InspectPod gets detailed pod information of the specified pod.
   831  	InspectPod(context.Context, *InspectPodRequest) (*InspectPodResponse, error)
   832  	// ListImages lists the images on the machine.
   833  	ListImages(context.Context, *ListImagesRequest) (*ListImagesResponse, error)
   834  	// InspectImage gets the detailed image information of the specified image.
   835  	InspectImage(context.Context, *InspectImageRequest) (*InspectImageResponse, error)
   836  	// ListenEvents listens for the events, it will return a response stream
   837  	// that will contain event objects.
   838  	ListenEvents(*ListenEventsRequest, PublicAPI_ListenEventsServer) error
   839  	// GetLogs gets the logs for a pod, if the app is also specified, then only the logs
   840  	// of the app will be returned.
   841  	//
   842  	// If 'follow' in the 'GetLogsRequest' is set to 'true', then the response stream
   843  	// will not be closed after the first response, the future logs will be sent via
   844  	// the stream.
   845  	GetLogs(*GetLogsRequest, PublicAPI_GetLogsServer) error
   846  }
   847  
   848  func RegisterPublicAPIServer(s *grpc.Server, srv PublicAPIServer) {
   849  	s.RegisterService(&_PublicAPI_serviceDesc, srv)
   850  }
   851  
   852  func _PublicAPI_GetInfo_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
   853  	in := new(GetInfoRequest)
   854  	if err := codec.Unmarshal(buf, in); err != nil {
   855  		return nil, err
   856  	}
   857  	out, err := srv.(PublicAPIServer).GetInfo(ctx, in)
   858  	if err != nil {
   859  		return nil, err
   860  	}
   861  	return out, nil
   862  }
   863  
   864  func _PublicAPI_ListPods_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
   865  	in := new(ListPodsRequest)
   866  	if err := codec.Unmarshal(buf, in); err != nil {
   867  		return nil, err
   868  	}
   869  	out, err := srv.(PublicAPIServer).ListPods(ctx, in)
   870  	if err != nil {
   871  		return nil, err
   872  	}
   873  	return out, nil
   874  }
   875  
   876  func _PublicAPI_InspectPod_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
   877  	in := new(InspectPodRequest)
   878  	if err := codec.Unmarshal(buf, in); err != nil {
   879  		return nil, err
   880  	}
   881  	out, err := srv.(PublicAPIServer).InspectPod(ctx, in)
   882  	if err != nil {
   883  		return nil, err
   884  	}
   885  	return out, nil
   886  }
   887  
   888  func _PublicAPI_ListImages_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
   889  	in := new(ListImagesRequest)
   890  	if err := codec.Unmarshal(buf, in); err != nil {
   891  		return nil, err
   892  	}
   893  	out, err := srv.(PublicAPIServer).ListImages(ctx, in)
   894  	if err != nil {
   895  		return nil, err
   896  	}
   897  	return out, nil
   898  }
   899  
   900  func _PublicAPI_InspectImage_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
   901  	in := new(InspectImageRequest)
   902  	if err := codec.Unmarshal(buf, in); err != nil {
   903  		return nil, err
   904  	}
   905  	out, err := srv.(PublicAPIServer).InspectImage(ctx, in)
   906  	if err != nil {
   907  		return nil, err
   908  	}
   909  	return out, nil
   910  }
   911  
   912  func _PublicAPI_ListenEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
   913  	m := new(ListenEventsRequest)
   914  	if err := stream.RecvMsg(m); err != nil {
   915  		return err
   916  	}
   917  	return srv.(PublicAPIServer).ListenEvents(m, &publicAPIListenEventsServer{stream})
   918  }
   919  
   920  type PublicAPI_ListenEventsServer interface {
   921  	Send(*ListenEventsResponse) error
   922  	grpc.ServerStream
   923  }
   924  
   925  type publicAPIListenEventsServer struct {
   926  	grpc.ServerStream
   927  }
   928  
   929  func (x *publicAPIListenEventsServer) Send(m *ListenEventsResponse) error {
   930  	return x.ServerStream.SendMsg(m)
   931  }
   932  
   933  func _PublicAPI_GetLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
   934  	m := new(GetLogsRequest)
   935  	if err := stream.RecvMsg(m); err != nil {
   936  		return err
   937  	}
   938  	return srv.(PublicAPIServer).GetLogs(m, &publicAPIGetLogsServer{stream})
   939  }
   940  
   941  type PublicAPI_GetLogsServer interface {
   942  	Send(*GetLogsResponse) error
   943  	grpc.ServerStream
   944  }
   945  
   946  type publicAPIGetLogsServer struct {
   947  	grpc.ServerStream
   948  }
   949  
   950  func (x *publicAPIGetLogsServer) Send(m *GetLogsResponse) error {
   951  	return x.ServerStream.SendMsg(m)
   952  }
   953  
   954  var _PublicAPI_serviceDesc = grpc.ServiceDesc{
   955  	ServiceName: "v1alpha.PublicAPI",
   956  	HandlerType: (*PublicAPIServer)(nil),
   957  	Methods: []grpc.MethodDesc{
   958  		{
   959  			MethodName: "GetInfo",
   960  			Handler:    _PublicAPI_GetInfo_Handler,
   961  		},
   962  		{
   963  			MethodName: "ListPods",
   964  			Handler:    _PublicAPI_ListPods_Handler,
   965  		},
   966  		{
   967  			MethodName: "InspectPod",
   968  			Handler:    _PublicAPI_InspectPod_Handler,
   969  		},
   970  		{
   971  			MethodName: "ListImages",
   972  			Handler:    _PublicAPI_ListImages_Handler,
   973  		},
   974  		{
   975  			MethodName: "InspectImage",
   976  			Handler:    _PublicAPI_InspectImage_Handler,
   977  		},
   978  	},
   979  	Streams: []grpc.StreamDesc{
   980  		{
   981  			StreamName:    "ListenEvents",
   982  			Handler:       _PublicAPI_ListenEvents_Handler,
   983  			ServerStreams: true,
   984  		},
   985  		{
   986  			StreamName:    "GetLogs",
   987  			Handler:       _PublicAPI_GetLogs_Handler,
   988  			ServerStreams: true,
   989  		},
   990  	},
   991  }