From 410b9e6c6a24a4a97122f4926bf90e9d63d5e4d4 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Wed, 23 Aug 2017 13:09:20 -0400 Subject: [PATCH 1/3] Add moby component architecture doc Adds basic architecture details for componentization work, and some starter protobuf definitions to work from. This doc is still in draft form and should be considered as such even after merge until the document states otherwise. The intent of this commit is not to put something in the repo that is gospel for the componentization work, but rather get the work kicked off so a larger group can start taking a look, requesting changes, etc. Basically, at this point this document should change or be validated by implementation (though realistically, the document is not complete). Over time there should be fewer changes and this would be the source of truth for implementing a moby component. Signed-off-by: Brian Goff --- components/architecture.md | 147 ++++++++++++++++++ .../component/version/v1/version.proto | 16 ++ .../containers/rootfs/v1/rootfs.proto | 47 ++++++ .../containers/runtime/v1/runtime.proto | 42 +++++ .../services/containers/store/v1/store.proto | 62 ++++++++ components/types/container/container.proto | 33 ++++ components/types/file.proto | 14 ++ 7 files changed, 361 insertions(+) create mode 100644 components/architecture.md create mode 100644 components/services/component/version/v1/version.proto create mode 100644 components/services/containers/rootfs/v1/rootfs.proto create mode 100644 components/services/containers/runtime/v1/runtime.proto create mode 100644 components/services/containers/store/v1/store.proto create mode 100644 components/types/container/container.proto create mode 100644 components/types/file.proto diff --git a/components/architecture.md b/components/architecture.md new file mode 100644 index 0000000000000..0f7eca9724d89 --- /dev/null +++ b/components/architecture.md @@ -0,0 +1,147 @@ +***Draft*** + +## Moby Core Component Architecture + +Moby Core is a container platform built for modularity. +Moby Core uses a component architecture which allows moby components to interact +with each other with well defined API's in a way that enables components +to be swapped out for different implementations at packaging time. + +Moby Core defines several of its own [components](#moby-core-services) along with +a default stack which implements those services. Packagers can take Moby Core as +defined, swap out components for different ones, and even supply completely new +components not specifically defined in the core architecture to extend +Moby Core's functionality. + +### Status + +This architecture is still in heavy development and this document should be considered fluid +for the time being. + +While the v1 HTTP API is considered stable, the components and component APIs are not finalized +and should NOT be considered stable. This document may contain things that do not even exist yet. + +***Use at your own risk. Expect frequent breakages.*** + +### Components + +A component is an isolated set of functionality that is likely useful in its +own right. + +A component: +- MUST provide a GRPC endpoint with the following services on a node-local socket (such as a unix socket or named pipe): + - MUST provide [GRPC healthcheck service](https://github.com/grpc/grpc/blob/master/doc/health-checking.md) + - MUST provide [Version service](services/component/version/v1) + - SHOULD provide [Metrics service](services/component/metrics/v1) +- MAY expose a separate API for external consumption +- SHOULD use GRPC to publish component-level services +- SHOULD be easily deployed as a container (the primary packaging format for +Moby Core, see [Packaging](#Packaging)). + - SHOULD log to stdout and/or stderr + - SHOULD NOT depend on shared filesystem access with other components + - If shared filesystem access is required, this SHOULD be well documented + +### Moby Core Services + +Moby Core defines a base set of services to be used with components along with +default implementations of those services. +A "service" in this case refers to a [GRPC service](https://grpc.io/docs/guides/concepts.html#service-definition). +A component may consist of one or more services. + +All Moby Core services MUST use GRPC for cross-component communication. +Proto files MUST be separate from the implementation, however generated +code MUST stay with the proto. + +While these services are split up here, multiple services MAY be part of +a single component. + +#### Public API's + +- moby-http-api-v1 - Provides the v1.* HTTP API + - Dependencies: + - moby-container-store + - moby-container-rootfs + - moby-plugin-store + - moby-network-store + - moby-volume-store + - moby-image-store + +#### Events + +- moby-events - Pub/sub for component level events. + +#### Container management + +- moby-container-store - Provides basic CRUD operations for container +specs/metadata. May be unnecessary or at least reduced scope after +[containerd#1378](https://github.com/containerd/containerd/pull/1378) +- moby-container-runtime - start/stop/kill/etc operations on containers + - Dependencies: + - moby-network-runtime + - moby-volume-runtime +- moby-container-rootfs - Provides access to container filesystems. +- moby-container-logs - Collects container stdio and forwards to a centralized logging service + +#### Plugins + +- moby-plugin-store - Provides basic CRUD operations for plugins + +#### Networking + +- moby-network-store - Provides basic CRUD operations for networks + - Dependencies: + - moby-plugin-store +- moby-network-runtime - Sets up networking for containers + - Dependencies: + - moby-network-store + +#### Persistent storage + +- moby-volume-store - Provides basic CRUD operations for volumes + - Dependencies: + - moby-plugin-store +- moby-volume-runtime - Sets up volumes for a container + - Dependencies: + - moby-volume-store + +#### Image Management + +- moby-layer-store - Storage for image layers +- moby-image-store - Provides basic CRUD operations for images + - Dependencies: + - moby-layer-store + +#### Component Management + +- moby-component-index - Provides registration and metadata storage for moby components +- moby-component-init - Initializes moby components, may not be used in some packaging formats. + - Dependencies: + - moby-component-registry +- moby-component-healthcheck - Runs healthchecks on moby components + - Dependencies: + - moby-component-registry + +#### Cluster Management + +TBD + +#### Other + +See the [service definitions](services) for these services. + +TODO: + - metrics + - tracing + +### Discovery + +Discovery is handled through the moby-component-registry. +Components are registered via a static component manifest config at startup. +The registry service is a GRPC service which allows you to look up a component's address, +version, and health status. + +### Packaging + +One goal of the component architecture is to easily package Moby Core via the +[Moby Tool](github.com/moby/tool) as "services". This enables packaging Moby +Core in multiple formats, and easily adding/removing components to the system. \ No newline at end of file diff --git a/components/services/component/version/v1/version.proto b/components/services/component/version/v1/version.proto new file mode 100644 index 0000000000000..bb2447660d736 --- /dev/null +++ b/components/services/component/version/v1/version.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package moby.core.services.version.v1; + +option go_package = "version"; + +import "google/protobuf/empty.proto"; + +service Version { + rpc Version(google.protobuf.Empty) returns (VersionResponse); +} + +message VersionResponse { + string version = 1; + string revision = 2; +} \ No newline at end of file diff --git a/components/services/containers/rootfs/v1/rootfs.proto b/components/services/containers/rootfs/v1/rootfs.proto new file mode 100644 index 0000000000000..35d5d20e69d89 --- /dev/null +++ b/components/services/containers/rootfs/v1/rootfs.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package moby.core.services.containers.rootfs.v1; + +import "types/container/container.proto"; +import "types/file.proto"; + +service RootfsService { + rpc ExtractRootfsArchive (ExtractRootfsArchiveRequest) returns (ExtractRootfsArchiveResponse) {} + rpc FetchRootfs (FetchRootfsRequest) returns (FetchRootfsResponse) {} + rpc StatRootfs (StatRootfsRequest) returns (StatRootfsResponse) {} + rpc DiffRootfs (DiffRootfsRequest) returns (DiffRootfsResponse) {} +} + +message ExtractRootfsArchiveRequest { + moby.core.v1.types.Container container = 1; + string target = 2; + // the archive ??? +} + +message ExtractRootfsArchiveResponse {} + +message FetchRootfsRequest { + moby.core.v1.types.Container container = 1; + string target = 2; +} + +message FetchRootfsResponse { + // the archive ??? +} + +message StatRootfsRequest { + moby.core.v1.types.Container container = 1; + string target = 2; +} + +message StatRootfsResponse { + moby.core.types.v1.FileInfo info = 1; +} + +message DiffRootfsRequest { + moby.core.v1.types.Container container = 1; +} + +message DiffRootfsResponse { + +} \ No newline at end of file diff --git a/components/services/containers/runtime/v1/runtime.proto b/components/services/containers/runtime/v1/runtime.proto new file mode 100644 index 0000000000000..4b2d4c3ee6419 --- /dev/null +++ b/components/services/containers/runtime/v1/runtime.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package moby.core.services.containers.runtime.v1; + +import "types/container/container.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +service ContainerRuntimeService { + rpc StartContainer(StartContainerRequest) returns (StartContainerResponse) {} + rpc KillContainer(KillContainerRequest) returns (KillContainerResponse) {} + rpc PauseContainer(PauseContainerRequest) returns(PauseContainerResponse) {} + rpc ResumeContainer(ResumeContainerRequest) returns (ResumeContainerResponse) {} +} + +message StartContainerRequest { + moby.core.v1.types.Container container = 1; +} + +message StartContainerResponse { + int32 pid = 1; +} + +message KillContainerRequest { + moby.core.v1.types.Container container = 1; + google.protobuf.Duration timeout = 2; + uint32 signal = 3; +} + +message KillContainerResponse {} + +message PauseContainerRequest { + moby.core.v1.types.Container container = 1; +} + +message PauseContainerResponse {} + +message ResumeContainerRequest{ + moby.core.v1.types.Container container = 1; +} + +message ResumeContainerResponse{} diff --git a/components/services/containers/store/v1/store.proto b/components/services/containers/store/v1/store.proto new file mode 100644 index 0000000000000..b5d4135e274ef --- /dev/null +++ b/components/services/containers/store/v1/store.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; + +package moby.core.services.containers.store.v1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "types/container/container.proto"; + +service ContainerStore { + rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse); + rpc UpdateContainer(UpdateContainerRequest) returns (UpdateContainerResponse); + rpc DeleteContainer(DeleteContainerRequest) returns (DeleteContainerResponse); + rpc GetContainer(GetContainerRequest) returns (GetContainerResponse); + rpc ListContainers(ListContainersRequest) returns (ListContainersResponse); +} + +message CreateContainerRequest { + moby.core.v1.types.ContainerSpec spec = 1; + moby.core.v1.types.Annotations annotations = 2; +} + +message CreateContainerResponse { + moby.core.v1.types.Container container = 1 [(gogoproto.nullable) = false]; +} + +message UpdateContainerRequest { + string container_id = 1; + moby.core.v1.types.Version version = 2; + moby.core.v1.types.ContainerSpec spec = 3; +} + +message UpdateContainerResponse { + moby.core.v1.types.Container container = 1 [(gogoproto.nullable) = false]; +} + +message DeleteContainerRequest { + string container_id = 1; +} + +message DeleteContainerResponse {} + +message GetContainerRequest { + string container_id = 1; +} + +message GetContainerResponse { + moby.core.v1.types.Container container = 1 [(gogoproto.nullable) = false]; +} + +message Filters { + repeated string container_ids = 3; + map labels = 4; + repeated string names = 5; +} + +message ListContainersRequest { + Filters filters = 1; +} + +message ListContainersResponse { + repeated moby.core.v1.types.Container containers = 1; +} diff --git a/components/types/container/container.proto b/components/types/container/container.proto new file mode 100644 index 0000000000000..4a3b260407429 --- /dev/null +++ b/components/types/container/container.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package moby.core.v1.types; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; + +message ContainerSpec { + Annotations annotations = 3; + google.protobuf.Any spec = 4; +} + +message Version { + uint64 index = 1; +} + +message Meta { + Version version = 1 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp created_at = 2; + google.protobuf.Timestamp updated_at = 3; +} + +message Annotations { + string Name = 1; + map labels = 2; +} + +message Container { + string id = 1; + ContainerSpec spec = 2; + Meta meta = 3; +} \ No newline at end of file diff --git a/components/types/file.proto b/components/types/file.proto new file mode 100644 index 0000000000000..22e092132af4c --- /dev/null +++ b/components/types/file.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package moby.core.types.v1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +message FileInfo { + string name = 1; + int64 size = 2; + uint32 mode = 3; + google.protobuf.Timestamp modified_at = 4; + google.protobuf.Any sys = 5; +} From a646344d3d564354ba2d760ac209b0d564e70fec Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 24 Aug 2017 14:34:24 -0400 Subject: [PATCH 2/3] Generate pb.go files for component services. Signed-off-by: Brian Goff --- components/Protobuild.toml | 99 + components/api/next.pb.txt | 2264 +++++++++++++++++ .../api/services/component/metrics/v1/doc.go | 1 + .../component/metrics/v1/metrics.pb.go | 160 ++ .../component/metrics/v1/metrics.proto | 19 + .../api/services/component/version/v1/doc.go | 1 + .../component/version/v1/version.pb.go | 155 ++ .../component/version/v1/version.proto | 0 .../api/services/containers/rootfs/v1/doc.go | 1 + .../containers/rootfs/v1/rootfs.pb.go | 386 +++ .../containers/rootfs/v1/rootfs.proto | 49 + .../api/services/containers/runtime/v1/doc.go | 1 + .../containers/runtime/v1/runtime.pb.go | 379 +++ .../containers/runtime/v1/runtime.proto | 5 +- .../api/services/containers/store/v1/doc.go | 1 + .../services/containers/store/v1/store.pb.go | 518 ++++ .../services/containers/store/v1/store.proto | 5 +- .../api/types/container/container.pb.go | 207 ++ .../{ => api}/types/container/container.proto | 0 components/api/types/container/doc.go | 1 + components/api/types/doc.go | 1 + components/api/types/file.pb.go | 105 + components/{ => api}/types/file.proto | 0 components/architecture.md | 6 +- .../containers/rootfs/v1/rootfs.proto | 47 - 25 files changed, 4357 insertions(+), 54 deletions(-) create mode 100644 components/Protobuild.toml create mode 100755 components/api/next.pb.txt create mode 100644 components/api/services/component/metrics/v1/doc.go create mode 100644 components/api/services/component/metrics/v1/metrics.pb.go create mode 100644 components/api/services/component/metrics/v1/metrics.proto create mode 100644 components/api/services/component/version/v1/doc.go create mode 100644 components/api/services/component/version/v1/version.pb.go rename components/{ => api}/services/component/version/v1/version.proto (100%) create mode 100644 components/api/services/containers/rootfs/v1/doc.go create mode 100644 components/api/services/containers/rootfs/v1/rootfs.pb.go create mode 100644 components/api/services/containers/rootfs/v1/rootfs.proto create mode 100644 components/api/services/containers/runtime/v1/doc.go create mode 100644 components/api/services/containers/runtime/v1/runtime.pb.go rename components/{ => api}/services/containers/runtime/v1/runtime.proto (90%) create mode 100644 components/api/services/containers/store/v1/doc.go create mode 100644 components/api/services/containers/store/v1/store.pb.go rename components/{ => api}/services/containers/store/v1/store.proto (93%) create mode 100644 components/api/types/container/container.pb.go rename components/{ => api}/types/container/container.proto (100%) create mode 100644 components/api/types/container/doc.go create mode 100644 components/api/types/doc.go create mode 100644 components/api/types/file.pb.go rename components/{ => api}/types/file.proto (100%) delete mode 100644 components/services/containers/rootfs/v1/rootfs.proto diff --git a/components/Protobuild.toml b/components/Protobuild.toml new file mode 100644 index 0000000000000..63a6672928e49 --- /dev/null +++ b/components/Protobuild.toml @@ -0,0 +1,99 @@ +version = "unstable" + +# Generator defines which generator to go. The default is "go". This will be +# formatted into the --xxx_out flag provided to protoc. Below, we have an +# example that selects the ctrd vanity binary. +# generator = "gogoctrd" +generator = "go" + +# Plugins allows one to specify one or more plugins for use in generation. +# +# The common example grpc is provided below. +plugins = ["grpc"] + +# Control protoc include paths. Below are usually some good defaults, but feel +# free to try it without them if it works for your project. +[includes] + # Include paths that will be added before all others. Typically, you want to + # treat the root of the project as an include, but this may not be necessary. + # + # "." is included by default + # before = ["."] + + # Paths that should be treated as include roots in relation to the vendor + # directory. These will be calculated with the vendor directory nearest the + # target package. + # + # With the example below, we import the gogo protobufs from the vendor + # directory. + # + # This is empty by default. + vendored = ["github.com/gogo/protobuf"] + + # Paths that will be added untouched to the end of the includes. We use + # `/usr/local/include` to pickup the common install location of protobuf. + # This is the default. + # after = ["usr/local/include"] + +# This section let's us map protobuf imports to Go packages. These will become +# `-M` directives in the call to the go protobuf generator. +# +# We have a few examples to map packages from the examples. +[packages] + "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" + "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/empty.proto" = "github.com/gogo/protobuf/types" + "github.com/prometheus/client_model/metrics.proto" = "github.com/prometheus/client_model/go" + +# Descriptors allows you to aggregate generated protobuf descriptors under a +# particular Go import path into a single, de-duplicated file. The result of +# configuring this option for one or more paths will be a text format protobuf +# dump of all the descriptors in the API. +# +# While this is useful for other applications that require access to +# descriptors, the goal of this features is to provide visibility into changes +# that may affect API stability. Each service, message and field will be +# included in the file, along with dependencies. If a change occurs that +# impacts API stability, it will be obvious in a diff with a file from the +# previous version. +# +# Save these descriptors in your repository. When the next round of protobuf +# changes are built and merged, additions and incompatible changes can be +# detected by diffing these files. When you release, move this file to the +# release version to keep track of the exports over time from various releases. +# +# This takes inspiration from Go's API checker in +# https://github.com/golang/go/tree/master/api, but does so for protobufs. +# Stablize packages and collections of packages of generated protobufs. +[[descriptors]] + +# Prefix specifies the protobuf import prefix relative to items that you want +# to stabilize. +# +# For example, if the files are imported as +# github.com/stevvooe/protobuild/examples/foo/foo.proto, and you want to +# stabilize everything in package "foo", it should be +# "github.com/stevvooe/protobuild/example/foo". +# +# The example below stablizes the protobufs under the examples directory. The +# generated descriptor file will include both the "foo" and "bar" subpackages. +prefix = "github.com/moby/moby/components/api" + +# Target defines the output location of the merged descriptor file. +target = "api/next.pb.txt" +ignore_files = [ + "gogoproto/gogo.proto", +] + +# Ignore files by their protobuf import path. +# +# This operates directly on the FileDescriptorProto.Name field, so it will +# filter out imported protobufs. This allows one to remove descriptors from the +# result that don't impact API stability, such as generation extension +# directives. +# +# The example below will exclude empty.proto. Experiment with this feature by +# uncommenting the line below and notice that the description of that file will +# be removed. +# ignore_files = ["google/protobuf/empty.proto"] + diff --git a/components/api/next.pb.txt b/components/api/next.pb.txt new file mode 100755 index 0000000000000..993ad30a2409f --- /dev/null +++ b/components/api/next.pb.txt @@ -0,0 +1,2264 @@ +file { + name: "github.com/prometheus/client_model/metrics.proto" + package: "io.prometheus.client" + message_type { + name: "LabelPair" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + } + message_type { + name: "Gauge" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "value" + } + } + message_type { + name: "Counter" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "value" + } + } + message_type { + name: "Quantile" + field { + name: "quantile" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "quantile" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "value" + } + } + message_type { + name: "Summary" + field { + name: "sample_count" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "sampleCount" + } + field { + name: "sample_sum" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "sampleSum" + } + field { + name: "quantile" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Quantile" + json_name: "quantile" + } + } + message_type { + name: "Untyped" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "value" + } + } + message_type { + name: "Histogram" + field { + name: "sample_count" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "sampleCount" + } + field { + name: "sample_sum" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "sampleSum" + } + field { + name: "bucket" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Bucket" + json_name: "bucket" + } + } + message_type { + name: "Bucket" + field { + name: "cumulative_count" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "cumulativeCount" + } + field { + name: "upper_bound" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "upperBound" + } + } + message_type { + name: "Metric" + field { + name: "label" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.LabelPair" + json_name: "label" + } + field { + name: "gauge" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Gauge" + json_name: "gauge" + } + field { + name: "counter" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Counter" + json_name: "counter" + } + field { + name: "summary" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Summary" + json_name: "summary" + } + field { + name: "untyped" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Untyped" + json_name: "untyped" + } + field { + name: "histogram" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Histogram" + json_name: "histogram" + } + field { + name: "timestamp_ms" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "timestampMs" + } + } + message_type { + name: "MetricFamily" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "help" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "help" + } + field { + name: "type" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".io.prometheus.client.MetricType" + json_name: "type" + } + field { + name: "metric" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.Metric" + json_name: "metric" + } + } + enum_type { + name: "MetricType" + value { + name: "COUNTER" + number: 0 + } + value { + name: "GAUGE" + number: 1 + } + value { + name: "SUMMARY" + number: 2 + } + value { + name: "UNTYPED" + number: 3 + } + value { + name: "HISTOGRAM" + number: 4 + } + } + options { + java_package: "io.prometheus.client" + } +} +file { + name: "github.com/moby/moby/components/api/services/component/metrics/v1/metrics.proto" + package: "moby.core.services.metrics.v1" + dependency: "github.com/prometheus/client_model/metrics.proto" + message_type { + name: "CollectMetricsRequest" + } + message_type { + name: "CollectMetricsResponse" + field { + name: "values" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.prometheus.client.MetricFamily" + json_name: "values" + } + } + service { + name: "Metrics" + method { + name: "CollectMetrics" + input_type: ".moby.core.services.metrics.v1.CollectMetricsRequest" + output_type: ".moby.core.services.metrics.v1.CollectMetricsResponse" + } + } + options { + go_package: "metrics" + } + syntax: "proto3" +} +file { + name: "google/protobuf/empty.proto" + package: "google.protobuf" + message_type { + name: "Empty" + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "EmptyProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/empty" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "github.com/moby/moby/components/api/services/component/version/v1/version.proto" + package: "moby.core.services.version.v1" + dependency: "google/protobuf/empty.proto" + message_type { + name: "VersionResponse" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "version" + } + field { + name: "revision" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "revision" + } + } + service { + name: "Version" + method { + name: "Version" + input_type: ".google.protobuf.Empty" + output_type: ".moby.core.services.version.v1.VersionResponse" + } + } + options { + go_package: "version" + } + syntax: "proto3" +} +file { + name: "google/protobuf/descriptor.proto" + package: "google.protobuf" + message_type { + name: "FileDescriptorSet" + field { + name: "file" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FileDescriptorProto" + json_name: "file" + } + } + message_type { + name: "FileDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "package" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "package" + } + field { + name: "dependency" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "dependency" + } + field { + name: "public_dependency" + number: 10 + label: LABEL_REPEATED + type: TYPE_INT32 + json_name: "publicDependency" + } + field { + name: "weak_dependency" + number: 11 + label: LABEL_REPEATED + type: TYPE_INT32 + json_name: "weakDependency" + } + field { + name: "message_type" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto" + json_name: "messageType" + } + field { + name: "enum_type" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumDescriptorProto" + json_name: "enumType" + } + field { + name: "service" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.ServiceDescriptorProto" + json_name: "service" + } + field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldDescriptorProto" + json_name: "extension" + } + field { + name: "options" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.FileOptions" + json_name: "options" + } + field { + name: "source_code_info" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.SourceCodeInfo" + json_name: "sourceCodeInfo" + } + field { + name: "syntax" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "syntax" + } + } + message_type { + name: "DescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "field" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldDescriptorProto" + json_name: "field" + } + field { + name: "extension" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldDescriptorProto" + json_name: "extension" + } + field { + name: "nested_type" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto" + json_name: "nestedType" + } + field { + name: "enum_type" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumDescriptorProto" + json_name: "enumType" + } + field { + name: "extension_range" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto.ExtensionRange" + json_name: "extensionRange" + } + field { + name: "oneof_decl" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.OneofDescriptorProto" + json_name: "oneofDecl" + } + field { + name: "options" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.MessageOptions" + json_name: "options" + } + field { + name: "reserved_range" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto.ReservedRange" + json_name: "reservedRange" + } + field { + name: "reserved_name" + number: 10 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "reservedName" + } + nested_type { + name: "ExtensionRange" + field { + name: "start" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "start" + } + field { + name: "end" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.ExtensionRangeOptions" + json_name: "options" + } + } + nested_type { + name: "ReservedRange" + field { + name: "start" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "start" + } + field { + name: "end" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + } + } + message_type { + name: "ExtensionRangeOptions" + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "FieldDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "number" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "number" + } + field { + name: "label" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldDescriptorProto.Label" + json_name: "label" + } + field { + name: "type" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldDescriptorProto.Type" + json_name: "type" + } + field { + name: "type_name" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "typeName" + } + field { + name: "extendee" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "extendee" + } + field { + name: "default_value" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "defaultValue" + } + field { + name: "oneof_index" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "oneofIndex" + } + field { + name: "json_name" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "jsonName" + } + field { + name: "options" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldOptions" + json_name: "options" + } + enum_type { + name: "Type" + value { + name: "TYPE_DOUBLE" + number: 1 + } + value { + name: "TYPE_FLOAT" + number: 2 + } + value { + name: "TYPE_INT64" + number: 3 + } + value { + name: "TYPE_UINT64" + number: 4 + } + value { + name: "TYPE_INT32" + number: 5 + } + value { + name: "TYPE_FIXED64" + number: 6 + } + value { + name: "TYPE_FIXED32" + number: 7 + } + value { + name: "TYPE_BOOL" + number: 8 + } + value { + name: "TYPE_STRING" + number: 9 + } + value { + name: "TYPE_GROUP" + number: 10 + } + value { + name: "TYPE_MESSAGE" + number: 11 + } + value { + name: "TYPE_BYTES" + number: 12 + } + value { + name: "TYPE_UINT32" + number: 13 + } + value { + name: "TYPE_ENUM" + number: 14 + } + value { + name: "TYPE_SFIXED32" + number: 15 + } + value { + name: "TYPE_SFIXED64" + number: 16 + } + value { + name: "TYPE_SINT32" + number: 17 + } + value { + name: "TYPE_SINT64" + number: 18 + } + } + enum_type { + name: "Label" + value { + name: "LABEL_OPTIONAL" + number: 1 + } + value { + name: "LABEL_REQUIRED" + number: 2 + } + value { + name: "LABEL_REPEATED" + number: 3 + } + } + } + message_type { + name: "OneofDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "options" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.OneofOptions" + json_name: "options" + } + } + message_type { + name: "EnumDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "value" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumValueDescriptorProto" + json_name: "value" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumOptions" + json_name: "options" + } + } + message_type { + name: "EnumValueDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "number" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "number" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumValueOptions" + json_name: "options" + } + } + message_type { + name: "ServiceDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "method" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.MethodDescriptorProto" + json_name: "method" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.ServiceOptions" + json_name: "options" + } + } + message_type { + name: "MethodDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "input_type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "inputType" + } + field { + name: "output_type" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "outputType" + } + field { + name: "options" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.MethodOptions" + json_name: "options" + } + field { + name: "client_streaming" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "clientStreaming" + } + field { + name: "server_streaming" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "serverStreaming" + } + } + message_type { + name: "FileOptions" + field { + name: "java_package" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "javaPackage" + } + field { + name: "java_outer_classname" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "javaOuterClassname" + } + field { + name: "java_multiple_files" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "javaMultipleFiles" + } + field { + name: "java_generate_equals_and_hash" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + deprecated: true + } + json_name: "javaGenerateEqualsAndHash" + } + field { + name: "java_string_check_utf8" + number: 27 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "javaStringCheckUtf8" + } + field { + name: "optimize_for" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FileOptions.OptimizeMode" + default_value: "SPEED" + json_name: "optimizeFor" + } + field { + name: "go_package" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "goPackage" + } + field { + name: "cc_generic_services" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "ccGenericServices" + } + field { + name: "java_generic_services" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "javaGenericServices" + } + field { + name: "py_generic_services" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "pyGenericServices" + } + field { + name: "php_generic_services" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "phpGenericServices" + } + field { + name: "deprecated" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "cc_enable_arenas" + number: 31 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "ccEnableArenas" + } + field { + name: "objc_class_prefix" + number: 36 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "objcClassPrefix" + } + field { + name: "csharp_namespace" + number: 37 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "csharpNamespace" + } + field { + name: "swift_prefix" + number: 39 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "swiftPrefix" + } + field { + name: "php_class_prefix" + number: 40 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "phpClassPrefix" + } + field { + name: "php_namespace" + number: 41 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "phpNamespace" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + enum_type { + name: "OptimizeMode" + value { + name: "SPEED" + number: 1 + } + value { + name: "CODE_SIZE" + number: 2 + } + value { + name: "LITE_RUNTIME" + number: 3 + } + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 38 + end: 39 + } + } + message_type { + name: "MessageOptions" + field { + name: "message_set_wire_format" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "messageSetWireFormat" + } + field { + name: "no_standard_descriptor_accessor" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "noStandardDescriptorAccessor" + } + field { + name: "deprecated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "map_entry" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "mapEntry" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 8 + end: 9 + } + reserved_range { + start: 9 + end: 10 + } + } + message_type { + name: "FieldOptions" + field { + name: "ctype" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldOptions.CType" + default_value: "STRING" + json_name: "ctype" + } + field { + name: "packed" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "packed" + } + field { + name: "jstype" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldOptions.JSType" + default_value: "JS_NORMAL" + json_name: "jstype" + } + field { + name: "lazy" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "lazy" + } + field { + name: "deprecated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "weak" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "weak" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + enum_type { + name: "CType" + value { + name: "STRING" + number: 0 + } + value { + name: "CORD" + number: 1 + } + value { + name: "STRING_PIECE" + number: 2 + } + } + enum_type { + name: "JSType" + value { + name: "JS_NORMAL" + number: 0 + } + value { + name: "JS_STRING" + number: 1 + } + value { + name: "JS_NUMBER" + number: 2 + } + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 4 + end: 5 + } + } + message_type { + name: "OneofOptions" + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "EnumOptions" + field { + name: "allow_alias" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "allowAlias" + } + field { + name: "deprecated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 5 + end: 6 + } + } + message_type { + name: "EnumValueOptions" + field { + name: "deprecated" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "ServiceOptions" + field { + name: "deprecated" + number: 33 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "MethodOptions" + field { + name: "deprecated" + number: 33 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "idempotency_level" + number: 34 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.MethodOptions.IdempotencyLevel" + default_value: "IDEMPOTENCY_UNKNOWN" + json_name: "idempotencyLevel" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + enum_type { + name: "IdempotencyLevel" + value { + name: "IDEMPOTENCY_UNKNOWN" + number: 0 + } + value { + name: "NO_SIDE_EFFECTS" + number: 1 + } + value { + name: "IDEMPOTENT" + number: 2 + } + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "UninterpretedOption" + field { + name: "name" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption.NamePart" + json_name: "name" + } + field { + name: "identifier_value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "identifierValue" + } + field { + name: "positive_int_value" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "positiveIntValue" + } + field { + name: "negative_int_value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "negativeIntValue" + } + field { + name: "double_value" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "doubleValue" + } + field { + name: "string_value" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "stringValue" + } + field { + name: "aggregate_value" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "aggregateValue" + } + nested_type { + name: "NamePart" + field { + name: "name_part" + number: 1 + label: LABEL_REQUIRED + type: TYPE_STRING + json_name: "namePart" + } + field { + name: "is_extension" + number: 2 + label: LABEL_REQUIRED + type: TYPE_BOOL + json_name: "isExtension" + } + } + } + message_type { + name: "SourceCodeInfo" + field { + name: "location" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.SourceCodeInfo.Location" + json_name: "location" + } + nested_type { + name: "Location" + field { + name: "path" + number: 1 + label: LABEL_REPEATED + type: TYPE_INT32 + options { + packed: true + } + json_name: "path" + } + field { + name: "span" + number: 2 + label: LABEL_REPEATED + type: TYPE_INT32 + options { + packed: true + } + json_name: "span" + } + field { + name: "leading_comments" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "leadingComments" + } + field { + name: "trailing_comments" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "trailingComments" + } + field { + name: "leading_detached_comments" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "leadingDetachedComments" + } + } + } + message_type { + name: "GeneratedCodeInfo" + field { + name: "annotation" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.GeneratedCodeInfo.Annotation" + json_name: "annotation" + } + nested_type { + name: "Annotation" + field { + name: "path" + number: 1 + label: LABEL_REPEATED + type: TYPE_INT32 + options { + packed: true + } + json_name: "path" + } + field { + name: "source_file" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sourceFile" + } + field { + name: "begin" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "begin" + } + field { + name: "end" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "DescriptorProtos" + optimize_for: SPEED + go_package: "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor" + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.Reflection" + } +} +file { + name: "google/protobuf/timestamp.proto" + package: "google.protobuf" + message_type { + name: "Timestamp" + field { + name: "seconds" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "seconds" + } + field { + name: "nanos" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "nanos" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "TimestampProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/timestamp" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "google/protobuf/any.proto" + package: "google.protobuf" + message_type { + name: "Any" + field { + name: "type_url" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "typeUrl" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "value" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "AnyProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/any" + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "github.com/moby/moby/components/api/types/container/container.proto" + package: "moby.core.v1.types" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/timestamp.proto" + dependency: "google/protobuf/any.proto" + message_type { + name: "ContainerSpec" + field { + name: "annotations" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Annotations" + json_name: "annotations" + } + field { + name: "spec" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Any" + json_name: "spec" + } + } + message_type { + name: "Version" + field { + name: "index" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "index" + } + } + message_type { + name: "Meta" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Version" + options { + 65001: 0 + } + json_name: "version" + } + field { + name: "created_at" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "createdAt" + } + field { + name: "updated_at" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "updatedAt" + } + } + message_type { + name: "Annotations" + field { + name: "Name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "Name" + } + field { + name: "labels" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Annotations.LabelsEntry" + json_name: "labels" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "Container" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "spec" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.ContainerSpec" + json_name: "spec" + } + field { + name: "meta" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Meta" + json_name: "meta" + } + } + syntax: "proto3" +} +file { + name: "github.com/moby/moby/components/api/types/file.proto" + package: "moby.core.types.v1" + dependency: "google/protobuf/any.proto" + dependency: "google/protobuf/timestamp.proto" + message_type { + name: "FileInfo" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "size" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "size" + } + field { + name: "mode" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "mode" + } + field { + name: "modified_at" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "modifiedAt" + } + field { + name: "sys" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Any" + json_name: "sys" + } + } + syntax: "proto3" +} +file { + name: "github.com/moby/moby/components/api/services/containers/rootfs/v1/rootfs.proto" + package: "moby.core.services.containers.rootfs.v1" + dependency: "github.com/moby/moby/components/api/types/container/container.proto" + dependency: "github.com/moby/moby/components/api/types/file.proto" + message_type { + name: "ExtractRootfsArchiveRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + field { + name: "target" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "target" + } + } + message_type { + name: "ExtractRootfsArchiveResponse" + } + message_type { + name: "FetchRootfsRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + field { + name: "target" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "target" + } + } + message_type { + name: "FetchRootfsResponse" + } + message_type { + name: "StatRootfsRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + field { + name: "target" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "target" + } + } + message_type { + name: "StatRootfsResponse" + field { + name: "info" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.types.v1.FileInfo" + json_name: "info" + } + } + message_type { + name: "DiffRootfsRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + } + message_type { + name: "DiffRootfsResponse" + } + service { + name: "RootfsService" + method { + name: "ExtractRootfsArchive" + input_type: ".moby.core.services.containers.rootfs.v1.ExtractRootfsArchiveRequest" + output_type: ".moby.core.services.containers.rootfs.v1.ExtractRootfsArchiveResponse" + options { + } + } + method { + name: "FetchRootfs" + input_type: ".moby.core.services.containers.rootfs.v1.FetchRootfsRequest" + output_type: ".moby.core.services.containers.rootfs.v1.FetchRootfsResponse" + options { + } + } + method { + name: "StatRootfs" + input_type: ".moby.core.services.containers.rootfs.v1.StatRootfsRequest" + output_type: ".moby.core.services.containers.rootfs.v1.StatRootfsResponse" + options { + } + } + method { + name: "DiffRootfs" + input_type: ".moby.core.services.containers.rootfs.v1.DiffRootfsRequest" + output_type: ".moby.core.services.containers.rootfs.v1.DiffRootfsResponse" + options { + } + } + } + options { + go_package: "rootfs" + } + syntax: "proto3" +} +file { + name: "google/protobuf/duration.proto" + package: "google.protobuf" + message_type { + name: "Duration" + field { + name: "seconds" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "seconds" + } + field { + name: "nanos" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "nanos" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "DurationProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/duration" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "github.com/moby/moby/components/api/services/containers/runtime/v1/runtime.proto" + package: "moby.core.services.containers.runtime.v1" + dependency: "github.com/moby/moby/components/api/types/container/container.proto" + dependency: "google/protobuf/duration.proto" + message_type { + name: "StartContainerRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + } + message_type { + name: "StartContainerResponse" + field { + name: "pid" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "pid" + } + } + message_type { + name: "KillContainerRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + field { + name: "timeout" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "timeout" + } + field { + name: "signal" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "signal" + } + } + message_type { + name: "KillContainerResponse" + } + message_type { + name: "PauseContainerRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + } + message_type { + name: "PauseContainerResponse" + } + message_type { + name: "ResumeContainerRequest" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "container" + } + } + message_type { + name: "ResumeContainerResponse" + } + service { + name: "ContainerRuntimeService" + method { + name: "StartContainer" + input_type: ".moby.core.services.containers.runtime.v1.StartContainerRequest" + output_type: ".moby.core.services.containers.runtime.v1.StartContainerResponse" + options { + } + } + method { + name: "KillContainer" + input_type: ".moby.core.services.containers.runtime.v1.KillContainerRequest" + output_type: ".moby.core.services.containers.runtime.v1.KillContainerResponse" + options { + } + } + method { + name: "PauseContainer" + input_type: ".moby.core.services.containers.runtime.v1.PauseContainerRequest" + output_type: ".moby.core.services.containers.runtime.v1.PauseContainerResponse" + options { + } + } + method { + name: "ResumeContainer" + input_type: ".moby.core.services.containers.runtime.v1.ResumeContainerRequest" + output_type: ".moby.core.services.containers.runtime.v1.ResumeContainerResponse" + options { + } + } + } + options { + go_package: "runtime" + } + syntax: "proto3" +} +file { + name: "github.com/moby/moby/components/api/services/containers/store/v1/store.proto" + package: "moby.core.services.containers.store.v1" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/moby/moby/components/api/types/container/container.proto" + message_type { + name: "CreateContainerRequest" + field { + name: "spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.ContainerSpec" + json_name: "spec" + } + field { + name: "annotations" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Annotations" + json_name: "annotations" + } + } + message_type { + name: "CreateContainerResponse" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + options { + 65001: 0 + } + json_name: "container" + } + } + message_type { + name: "UpdateContainerRequest" + field { + name: "container_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + field { + name: "version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Version" + json_name: "version" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.ContainerSpec" + json_name: "spec" + } + } + message_type { + name: "UpdateContainerResponse" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + options { + 65001: 0 + } + json_name: "container" + } + } + message_type { + name: "DeleteContainerRequest" + field { + name: "container_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + } + message_type { + name: "DeleteContainerResponse" + } + message_type { + name: "GetContainerRequest" + field { + name: "container_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + } + message_type { + name: "GetContainerResponse" + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + options { + 65001: 0 + } + json_name: "container" + } + } + message_type { + name: "Filters" + field { + name: "container_ids" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "containerIds" + } + field { + name: "labels" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".moby.core.services.containers.store.v1.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "names" + number: 5 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "ListContainersRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".moby.core.services.containers.store.v1.Filters" + json_name: "filters" + } + } + message_type { + name: "ListContainersResponse" + field { + name: "containers" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".moby.core.v1.types.Container" + json_name: "containers" + } + } + service { + name: "ContainerStore" + method { + name: "CreateContainer" + input_type: ".moby.core.services.containers.store.v1.CreateContainerRequest" + output_type: ".moby.core.services.containers.store.v1.CreateContainerResponse" + } + method { + name: "UpdateContainer" + input_type: ".moby.core.services.containers.store.v1.UpdateContainerRequest" + output_type: ".moby.core.services.containers.store.v1.UpdateContainerResponse" + } + method { + name: "DeleteContainer" + input_type: ".moby.core.services.containers.store.v1.DeleteContainerRequest" + output_type: ".moby.core.services.containers.store.v1.DeleteContainerResponse" + } + method { + name: "GetContainer" + input_type: ".moby.core.services.containers.store.v1.GetContainerRequest" + output_type: ".moby.core.services.containers.store.v1.GetContainerResponse" + } + method { + name: "ListContainers" + input_type: ".moby.core.services.containers.store.v1.ListContainersRequest" + output_type: ".moby.core.services.containers.store.v1.ListContainersResponse" + } + } + options { + go_package: "store" + } + syntax: "proto3" +} diff --git a/components/api/services/component/metrics/v1/doc.go b/components/api/services/component/metrics/v1/doc.go new file mode 100644 index 0000000000000..1abe097a36e79 --- /dev/null +++ b/components/api/services/component/metrics/v1/doc.go @@ -0,0 +1 @@ +package metrics diff --git a/components/api/services/component/metrics/v1/metrics.pb.go b/components/api/services/component/metrics/v1/metrics.pb.go new file mode 100644 index 0000000000000..ebcd6a7b098c3 --- /dev/null +++ b/components/api/services/component/metrics/v1/metrics.pb.go @@ -0,0 +1,160 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/services/component/metrics/v1/metrics.proto + +/* +Package metrics is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/services/component/metrics/v1/metrics.proto + +It has these top-level messages: + CollectMetricsRequest + CollectMetricsResponse +*/ +package metrics + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import io_prometheus_client "github.com/prometheus/client_model/go" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type CollectMetricsRequest struct { +} + +func (m *CollectMetricsRequest) Reset() { *m = CollectMetricsRequest{} } +func (m *CollectMetricsRequest) String() string { return proto.CompactTextString(m) } +func (*CollectMetricsRequest) ProtoMessage() {} +func (*CollectMetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type CollectMetricsResponse struct { + Values []*io_prometheus_client.MetricFamily `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` +} + +func (m *CollectMetricsResponse) Reset() { *m = CollectMetricsResponse{} } +func (m *CollectMetricsResponse) String() string { return proto.CompactTextString(m) } +func (*CollectMetricsResponse) ProtoMessage() {} +func (*CollectMetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *CollectMetricsResponse) GetValues() []*io_prometheus_client.MetricFamily { + if m != nil { + return m.Values + } + return nil +} + +func init() { + proto.RegisterType((*CollectMetricsRequest)(nil), "moby.core.services.metrics.v1.CollectMetricsRequest") + proto.RegisterType((*CollectMetricsResponse)(nil), "moby.core.services.metrics.v1.CollectMetricsResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Metrics service + +type MetricsClient interface { + CollectMetrics(ctx context.Context, in *CollectMetricsRequest, opts ...grpc.CallOption) (*CollectMetricsResponse, error) +} + +type metricsClient struct { + cc *grpc.ClientConn +} + +func NewMetricsClient(cc *grpc.ClientConn) MetricsClient { + return &metricsClient{cc} +} + +func (c *metricsClient) CollectMetrics(ctx context.Context, in *CollectMetricsRequest, opts ...grpc.CallOption) (*CollectMetricsResponse, error) { + out := new(CollectMetricsResponse) + err := grpc.Invoke(ctx, "/moby.core.services.metrics.v1.Metrics/CollectMetrics", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Metrics service + +type MetricsServer interface { + CollectMetrics(context.Context, *CollectMetricsRequest) (*CollectMetricsResponse, error) +} + +func RegisterMetricsServer(s *grpc.Server, srv MetricsServer) { + s.RegisterService(&_Metrics_serviceDesc, srv) +} + +func _Metrics_CollectMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CollectMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServer).CollectMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.metrics.v1.Metrics/CollectMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServer).CollectMetrics(ctx, req.(*CollectMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Metrics_serviceDesc = grpc.ServiceDesc{ + ServiceName: "moby.core.services.metrics.v1.Metrics", + HandlerType: (*MetricsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CollectMetrics", + Handler: _Metrics_CollectMetrics_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/moby/moby/components/api/services/component/metrics/v1/metrics.proto", +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/services/component/metrics/v1/metrics.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 242 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0x4f, 0x4b, 0x03, 0x31, + 0x10, 0x47, 0x29, 0x42, 0x8b, 0x11, 0x3c, 0x2c, 0xf8, 0x87, 0x82, 0x20, 0x7b, 0xf2, 0x34, 0xb1, + 0x55, 0x2f, 0x1e, 0x15, 0xbc, 0x89, 0x50, 0x3c, 0x79, 0x91, 0xdd, 0x38, 0xd8, 0x40, 0xb2, 0x13, + 0x33, 0x93, 0x40, 0x0f, 0xde, 0xfd, 0xd8, 0xa2, 0xd9, 0xa5, 0x56, 0x44, 0xe8, 0x25, 0x84, 0xc9, + 0xbc, 0xdf, 0xcb, 0x8c, 0x7a, 0x78, 0xb5, 0xb2, 0x4c, 0x2d, 0x18, 0xf2, 0xda, 0x53, 0xbb, 0x2a, + 0x87, 0x21, 0x1f, 0xa8, 0xc3, 0x4e, 0x58, 0x37, 0xc1, 0x6a, 0xc6, 0x98, 0xad, 0x41, 0x5e, 0xd7, + 0xb5, 0x47, 0x89, 0xd6, 0xb0, 0xce, 0xb3, 0xe1, 0x0a, 0x21, 0x92, 0x50, 0x75, 0xf2, 0x15, 0x00, + 0x86, 0x22, 0xc2, 0x80, 0xc1, 0xd0, 0x91, 0x67, 0xd3, 0xf3, 0x1f, 0xbe, 0x10, 0xc9, 0xa3, 0x2c, + 0x31, 0xb1, 0x36, 0xce, 0x62, 0x27, 0xcf, 0x9e, 0x5e, 0xd0, 0x6d, 0x06, 0xd6, 0x47, 0xea, 0xe0, + 0x96, 0x9c, 0x43, 0x23, 0xf7, 0xa5, 0xbe, 0xc0, 0xb7, 0x84, 0x2c, 0xf5, 0xa3, 0x3a, 0xfc, 0xfd, + 0xc0, 0x81, 0x3a, 0xc6, 0xea, 0x5a, 0x8d, 0x73, 0xe3, 0x12, 0xf2, 0xf1, 0xe8, 0x74, 0xe7, 0x6c, + 0x6f, 0x5e, 0x83, 0x25, 0x58, 0xdb, 0xa0, 0xd8, 0xa0, 0x60, 0x77, 0x8d, 0xb7, 0x6e, 0xb5, 0xe8, + 0x89, 0xf9, 0xc7, 0x48, 0x4d, 0xfa, 0xbc, 0xea, 0x5d, 0xed, 0x6f, 0x1a, 0xaa, 0x4b, 0xf8, 0x77, + 0x3c, 0xf8, 0xf3, 0xa7, 0xd3, 0xab, 0x2d, 0xa9, 0x32, 0xc6, 0xcd, 0xee, 0xd3, 0xa4, 0x6f, 0x6a, + 0xc7, 0xdf, 0xbb, 0xb8, 0xf8, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x57, 0x07, 0x99, 0xaf, 0x01, + 0x00, 0x00, +} diff --git a/components/api/services/component/metrics/v1/metrics.proto b/components/api/services/component/metrics/v1/metrics.proto new file mode 100644 index 0000000000000..12d2917ae8bbb --- /dev/null +++ b/components/api/services/component/metrics/v1/metrics.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package moby.core.services.metrics.v1; + +option go_package = "metrics"; + +import "github.com/prometheus/client_model/metrics.proto"; + +// Metrics provides support for publishing prometheus style metrics on a GRPC endpoint. +// This would be used by a client to collect metrics and expose to an external service. +service Metrics { + rpc CollectMetrics(CollectMetricsRequest) returns (CollectMetricsResponse); +} + +message CollectMetricsRequest {} + +message CollectMetricsResponse { + repeated io.prometheus.client.MetricFamily values = 1; +} diff --git a/components/api/services/component/version/v1/doc.go b/components/api/services/component/version/v1/doc.go new file mode 100644 index 0000000000000..f37d99d0c2fb0 --- /dev/null +++ b/components/api/services/component/version/v1/doc.go @@ -0,0 +1 @@ +package version diff --git a/components/api/services/component/version/v1/version.pb.go b/components/api/services/component/version/v1/version.pb.go new file mode 100644 index 0000000000000..d2c2abf597f80 --- /dev/null +++ b/components/api/services/component/version/v1/version.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/services/component/version/v1/version.proto + +/* +Package version is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/services/component/version/v1/version.proto + +It has these top-level messages: + VersionResponse +*/ +package version + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/gogo/protobuf/types" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type VersionResponse struct { + Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` + Revision string `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"` +} + +func (m *VersionResponse) Reset() { *m = VersionResponse{} } +func (m *VersionResponse) String() string { return proto.CompactTextString(m) } +func (*VersionResponse) ProtoMessage() {} +func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *VersionResponse) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *VersionResponse) GetRevision() string { + if m != nil { + return m.Revision + } + return "" +} + +func init() { + proto.RegisterType((*VersionResponse)(nil), "moby.core.services.version.v1.VersionResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Version service + +type VersionClient interface { + Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error) +} + +type versionClient struct { + cc *grpc.ClientConn +} + +func NewVersionClient(cc *grpc.ClientConn) VersionClient { + return &versionClient{cc} +} + +func (c *versionClient) Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { + out := new(VersionResponse) + err := grpc.Invoke(ctx, "/moby.core.services.version.v1.Version/Version", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Version service + +type VersionServer interface { + Version(context.Context, *google_protobuf.Empty) (*VersionResponse, error) +} + +func RegisterVersionServer(s *grpc.Server, srv VersionServer) { + s.RegisterService(&_Version_serviceDesc, srv) +} + +func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(google_protobuf.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VersionServer).Version(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.version.v1.Version/Version", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VersionServer).Version(ctx, req.(*google_protobuf.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Version_serviceDesc = grpc.ServiceDesc{ + ServiceName: "moby.core.services.version.v1.Version", + HandlerType: (*VersionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Version", + Handler: _Version_Version_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/moby/moby/components/api/services/component/version/v1/version.proto", +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/services/component/version/v1/version.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x4e, 0xbd, 0x4a, 0xc0, 0x30, + 0x10, 0xa6, 0x0e, 0xd6, 0x66, 0x11, 0x32, 0x48, 0xa9, 0x08, 0xe2, 0xe4, 0x74, 0xa1, 0xfa, 0x06, + 0x82, 0x38, 0x8a, 0x1d, 0x1c, 0xc4, 0xc5, 0x84, 0xb3, 0x06, 0x4c, 0x2e, 0x24, 0x69, 0xa0, 0x6f, + 0x2f, 0x4d, 0x1a, 0x0b, 0x0e, 0x2e, 0xe1, 0xbe, 0x7c, 0xbf, 0xec, 0x79, 0xd6, 0xf1, 0x6b, 0x91, + 0xa0, 0xc8, 0x08, 0x43, 0x72, 0x2d, 0x8f, 0x22, 0xe3, 0xc8, 0xa2, 0x8d, 0x41, 0x7c, 0x38, 0x2d, + 0x02, 0xfa, 0xa4, 0x15, 0x86, 0xe3, 0x5f, 0x24, 0xf4, 0x41, 0x93, 0x15, 0x69, 0xac, 0x27, 0x38, + 0x4f, 0x91, 0xf8, 0xd5, 0x16, 0x00, 0x8a, 0x3c, 0x42, 0xb5, 0x41, 0x55, 0xa4, 0x71, 0xb8, 0x9c, + 0x89, 0xe6, 0x6f, 0x14, 0x59, 0x2c, 0x97, 0x4f, 0x81, 0xc6, 0xc5, 0xb5, 0x78, 0x6f, 0x9e, 0xd8, + 0xf9, 0x6b, 0x91, 0x4e, 0x18, 0x1c, 0xd9, 0x80, 0xbc, 0x67, 0xed, 0xee, 0xee, 0x9b, 0xeb, 0xe6, + 0xb6, 0x9b, 0x2a, 0xe4, 0x03, 0x3b, 0xf3, 0x98, 0x74, 0xa6, 0x4e, 0x32, 0xf5, 0x8b, 0xef, 0xde, + 0x59, 0xbb, 0x07, 0xf1, 0x97, 0xe3, 0xbc, 0x80, 0x52, 0x0e, 0xb5, 0x1c, 0x1e, 0xb7, 0xf2, 0x01, + 0xe0, 0xdf, 0xcd, 0xf0, 0x67, 0xd3, 0x43, 0xf7, 0x56, 0x47, 0xc8, 0xd3, 0x1c, 0x75, 0xff, 0x13, + 0x00, 0x00, 0xff, 0xff, 0xf5, 0xec, 0xc0, 0x39, 0x47, 0x01, 0x00, 0x00, +} diff --git a/components/services/component/version/v1/version.proto b/components/api/services/component/version/v1/version.proto similarity index 100% rename from components/services/component/version/v1/version.proto rename to components/api/services/component/version/v1/version.proto diff --git a/components/api/services/containers/rootfs/v1/doc.go b/components/api/services/containers/rootfs/v1/doc.go new file mode 100644 index 0000000000000..a58e12b84c536 --- /dev/null +++ b/components/api/services/containers/rootfs/v1/doc.go @@ -0,0 +1 @@ +package rootfs diff --git a/components/api/services/containers/rootfs/v1/rootfs.pb.go b/components/api/services/containers/rootfs/v1/rootfs.pb.go new file mode 100644 index 0000000000000..40872d00db765 --- /dev/null +++ b/components/api/services/containers/rootfs/v1/rootfs.pb.go @@ -0,0 +1,386 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/services/containers/rootfs/v1/rootfs.proto + +/* +Package rootfs is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/services/containers/rootfs/v1/rootfs.proto + +It has these top-level messages: + ExtractRootfsArchiveRequest + ExtractRootfsArchiveResponse + FetchRootfsRequest + FetchRootfsResponse + StatRootfsRequest + StatRootfsResponse + DiffRootfsRequest + DiffRootfsResponse +*/ +package rootfs + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import moby_core_v1_types "github.com/moby/moby/components/api/types/container" +import moby_core_types_v1 "github.com/moby/moby/components/api/types" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type ExtractRootfsArchiveRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` + Target string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` +} + +func (m *ExtractRootfsArchiveRequest) Reset() { *m = ExtractRootfsArchiveRequest{} } +func (m *ExtractRootfsArchiveRequest) String() string { return proto.CompactTextString(m) } +func (*ExtractRootfsArchiveRequest) ProtoMessage() {} +func (*ExtractRootfsArchiveRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *ExtractRootfsArchiveRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +func (m *ExtractRootfsArchiveRequest) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +type ExtractRootfsArchiveResponse struct { +} + +func (m *ExtractRootfsArchiveResponse) Reset() { *m = ExtractRootfsArchiveResponse{} } +func (m *ExtractRootfsArchiveResponse) String() string { return proto.CompactTextString(m) } +func (*ExtractRootfsArchiveResponse) ProtoMessage() {} +func (*ExtractRootfsArchiveResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +type FetchRootfsRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` + Target string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` +} + +func (m *FetchRootfsRequest) Reset() { *m = FetchRootfsRequest{} } +func (m *FetchRootfsRequest) String() string { return proto.CompactTextString(m) } +func (*FetchRootfsRequest) ProtoMessage() {} +func (*FetchRootfsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *FetchRootfsRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +func (m *FetchRootfsRequest) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +type FetchRootfsResponse struct { +} + +func (m *FetchRootfsResponse) Reset() { *m = FetchRootfsResponse{} } +func (m *FetchRootfsResponse) String() string { return proto.CompactTextString(m) } +func (*FetchRootfsResponse) ProtoMessage() {} +func (*FetchRootfsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +type StatRootfsRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` + Target string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` +} + +func (m *StatRootfsRequest) Reset() { *m = StatRootfsRequest{} } +func (m *StatRootfsRequest) String() string { return proto.CompactTextString(m) } +func (*StatRootfsRequest) ProtoMessage() {} +func (*StatRootfsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *StatRootfsRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +func (m *StatRootfsRequest) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +type StatRootfsResponse struct { + Info *moby_core_types_v1.FileInfo `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"` +} + +func (m *StatRootfsResponse) Reset() { *m = StatRootfsResponse{} } +func (m *StatRootfsResponse) String() string { return proto.CompactTextString(m) } +func (*StatRootfsResponse) ProtoMessage() {} +func (*StatRootfsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *StatRootfsResponse) GetInfo() *moby_core_types_v1.FileInfo { + if m != nil { + return m.Info + } + return nil +} + +type DiffRootfsRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *DiffRootfsRequest) Reset() { *m = DiffRootfsRequest{} } +func (m *DiffRootfsRequest) String() string { return proto.CompactTextString(m) } +func (*DiffRootfsRequest) ProtoMessage() {} +func (*DiffRootfsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *DiffRootfsRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type DiffRootfsResponse struct { +} + +func (m *DiffRootfsResponse) Reset() { *m = DiffRootfsResponse{} } +func (m *DiffRootfsResponse) String() string { return proto.CompactTextString(m) } +func (*DiffRootfsResponse) ProtoMessage() {} +func (*DiffRootfsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func init() { + proto.RegisterType((*ExtractRootfsArchiveRequest)(nil), "moby.core.services.containers.rootfs.v1.ExtractRootfsArchiveRequest") + proto.RegisterType((*ExtractRootfsArchiveResponse)(nil), "moby.core.services.containers.rootfs.v1.ExtractRootfsArchiveResponse") + proto.RegisterType((*FetchRootfsRequest)(nil), "moby.core.services.containers.rootfs.v1.FetchRootfsRequest") + proto.RegisterType((*FetchRootfsResponse)(nil), "moby.core.services.containers.rootfs.v1.FetchRootfsResponse") + proto.RegisterType((*StatRootfsRequest)(nil), "moby.core.services.containers.rootfs.v1.StatRootfsRequest") + proto.RegisterType((*StatRootfsResponse)(nil), "moby.core.services.containers.rootfs.v1.StatRootfsResponse") + proto.RegisterType((*DiffRootfsRequest)(nil), "moby.core.services.containers.rootfs.v1.DiffRootfsRequest") + proto.RegisterType((*DiffRootfsResponse)(nil), "moby.core.services.containers.rootfs.v1.DiffRootfsResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for RootfsService service + +type RootfsServiceClient interface { + ExtractRootfsArchive(ctx context.Context, in *ExtractRootfsArchiveRequest, opts ...grpc.CallOption) (*ExtractRootfsArchiveResponse, error) + FetchRootfs(ctx context.Context, in *FetchRootfsRequest, opts ...grpc.CallOption) (*FetchRootfsResponse, error) + StatRootfs(ctx context.Context, in *StatRootfsRequest, opts ...grpc.CallOption) (*StatRootfsResponse, error) + DiffRootfs(ctx context.Context, in *DiffRootfsRequest, opts ...grpc.CallOption) (*DiffRootfsResponse, error) +} + +type rootfsServiceClient struct { + cc *grpc.ClientConn +} + +func NewRootfsServiceClient(cc *grpc.ClientConn) RootfsServiceClient { + return &rootfsServiceClient{cc} +} + +func (c *rootfsServiceClient) ExtractRootfsArchive(ctx context.Context, in *ExtractRootfsArchiveRequest, opts ...grpc.CallOption) (*ExtractRootfsArchiveResponse, error) { + out := new(ExtractRootfsArchiveResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.rootfs.v1.RootfsService/ExtractRootfsArchive", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rootfsServiceClient) FetchRootfs(ctx context.Context, in *FetchRootfsRequest, opts ...grpc.CallOption) (*FetchRootfsResponse, error) { + out := new(FetchRootfsResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.rootfs.v1.RootfsService/FetchRootfs", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rootfsServiceClient) StatRootfs(ctx context.Context, in *StatRootfsRequest, opts ...grpc.CallOption) (*StatRootfsResponse, error) { + out := new(StatRootfsResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.rootfs.v1.RootfsService/StatRootfs", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rootfsServiceClient) DiffRootfs(ctx context.Context, in *DiffRootfsRequest, opts ...grpc.CallOption) (*DiffRootfsResponse, error) { + out := new(DiffRootfsResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.rootfs.v1.RootfsService/DiffRootfs", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for RootfsService service + +type RootfsServiceServer interface { + ExtractRootfsArchive(context.Context, *ExtractRootfsArchiveRequest) (*ExtractRootfsArchiveResponse, error) + FetchRootfs(context.Context, *FetchRootfsRequest) (*FetchRootfsResponse, error) + StatRootfs(context.Context, *StatRootfsRequest) (*StatRootfsResponse, error) + DiffRootfs(context.Context, *DiffRootfsRequest) (*DiffRootfsResponse, error) +} + +func RegisterRootfsServiceServer(s *grpc.Server, srv RootfsServiceServer) { + s.RegisterService(&_RootfsService_serviceDesc, srv) +} + +func _RootfsService_ExtractRootfsArchive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExtractRootfsArchiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RootfsServiceServer).ExtractRootfsArchive(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.rootfs.v1.RootfsService/ExtractRootfsArchive", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RootfsServiceServer).ExtractRootfsArchive(ctx, req.(*ExtractRootfsArchiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RootfsService_FetchRootfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchRootfsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RootfsServiceServer).FetchRootfs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.rootfs.v1.RootfsService/FetchRootfs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RootfsServiceServer).FetchRootfs(ctx, req.(*FetchRootfsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RootfsService_StatRootfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatRootfsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RootfsServiceServer).StatRootfs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.rootfs.v1.RootfsService/StatRootfs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RootfsServiceServer).StatRootfs(ctx, req.(*StatRootfsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RootfsService_DiffRootfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiffRootfsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RootfsServiceServer).DiffRootfs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.rootfs.v1.RootfsService/DiffRootfs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RootfsServiceServer).DiffRootfs(ctx, req.(*DiffRootfsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RootfsService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "moby.core.services.containers.rootfs.v1.RootfsService", + HandlerType: (*RootfsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExtractRootfsArchive", + Handler: _RootfsService_ExtractRootfsArchive_Handler, + }, + { + MethodName: "FetchRootfs", + Handler: _RootfsService_FetchRootfs_Handler, + }, + { + MethodName: "StatRootfs", + Handler: _RootfsService_StatRootfs_Handler, + }, + { + MethodName: "DiffRootfs", + Handler: _RootfsService_DiffRootfs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/moby/moby/components/api/services/containers/rootfs/v1/rootfs.proto", +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/services/containers/rootfs/v1/rootfs.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94,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xac, 0xca, 0xc5, 0xd7, 0x9b, 0x9a, + 0x9e, 0x98, 0xd5, 0x92, 0x7f, 0xd3, 0xff, 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x1a, 0xe4, + 0x46, 0x91, 0x05, 0x00, 0x00, +} diff --git a/components/api/services/containers/rootfs/v1/rootfs.proto b/components/api/services/containers/rootfs/v1/rootfs.proto new file mode 100644 index 0000000000000..eb97824344e79 --- /dev/null +++ b/components/api/services/containers/rootfs/v1/rootfs.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package moby.core.services.containers.rootfs.v1; + +option go_package = "rootfs"; + +import "github.com/moby/moby/components/api/types/container/container.proto"; +import "github.com/moby/moby/components/api/types/file.proto"; + +service RootfsService { + rpc ExtractRootfsArchive (ExtractRootfsArchiveRequest) returns (ExtractRootfsArchiveResponse) {} + rpc FetchRootfs (FetchRootfsRequest) returns (FetchRootfsResponse) {} + rpc StatRootfs (StatRootfsRequest) returns (StatRootfsResponse) {} + rpc DiffRootfs (DiffRootfsRequest) returns (DiffRootfsResponse) {} +} + +message ExtractRootfsArchiveRequest { + moby.core.v1.types.Container container = 1; + string target = 2; + // the archive ??? +} + +message ExtractRootfsArchiveResponse {} + +message FetchRootfsRequest { + moby.core.v1.types.Container container = 1; + string target = 2; +} + +message FetchRootfsResponse { + // the archive ??? +} + +message StatRootfsRequest { + moby.core.v1.types.Container container = 1; + string target = 2; +} + +message StatRootfsResponse { + moby.core.types.v1.FileInfo info = 1; +} + +message DiffRootfsRequest { + moby.core.v1.types.Container container = 1; +} + +message DiffRootfsResponse { + +} \ No newline at end of file diff --git a/components/api/services/containers/runtime/v1/doc.go b/components/api/services/containers/runtime/v1/doc.go new file mode 100644 index 0000000000000..7ccdf5f690f85 --- /dev/null +++ b/components/api/services/containers/runtime/v1/doc.go @@ -0,0 +1 @@ +package runtime diff --git a/components/api/services/containers/runtime/v1/runtime.pb.go b/components/api/services/containers/runtime/v1/runtime.pb.go new file mode 100644 index 0000000000000..811a979c2be1d --- /dev/null +++ b/components/api/services/containers/runtime/v1/runtime.pb.go @@ -0,0 +1,379 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/services/containers/runtime/v1/runtime.proto + +/* +Package runtime is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/services/containers/runtime/v1/runtime.proto + +It has these top-level messages: + StartContainerRequest + StartContainerResponse + KillContainerRequest + KillContainerResponse + PauseContainerRequest + PauseContainerResponse + ResumeContainerRequest + ResumeContainerResponse +*/ +package runtime + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import moby_core_v1_types "github.com/moby/moby/components/api/types/container" +import google_protobuf3 "github.com/golang/protobuf/ptypes/duration" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type StartContainerRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *StartContainerRequest) Reset() { *m = StartContainerRequest{} } +func (m *StartContainerRequest) String() string { return proto.CompactTextString(m) } +func (*StartContainerRequest) ProtoMessage() {} +func (*StartContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *StartContainerRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type StartContainerResponse struct { + Pid int32 `protobuf:"varint,1,opt,name=pid" json:"pid,omitempty"` +} + +func (m *StartContainerResponse) Reset() { *m = StartContainerResponse{} } +func (m *StartContainerResponse) String() string { return proto.CompactTextString(m) } +func (*StartContainerResponse) ProtoMessage() {} +func (*StartContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *StartContainerResponse) GetPid() int32 { + if m != nil { + return m.Pid + } + return 0 +} + +type KillContainerRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` + Timeout *google_protobuf3.Duration `protobuf:"bytes,2,opt,name=timeout" json:"timeout,omitempty"` + Signal uint32 `protobuf:"varint,3,opt,name=signal" json:"signal,omitempty"` +} + +func (m *KillContainerRequest) Reset() { *m = KillContainerRequest{} } +func (m *KillContainerRequest) String() string { return proto.CompactTextString(m) } +func (*KillContainerRequest) ProtoMessage() {} +func (*KillContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *KillContainerRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +func (m *KillContainerRequest) GetTimeout() *google_protobuf3.Duration { + if m != nil { + return m.Timeout + } + return nil +} + +func (m *KillContainerRequest) GetSignal() uint32 { + if m != nil { + return m.Signal + } + return 0 +} + +type KillContainerResponse struct { +} + +func (m *KillContainerResponse) Reset() { *m = KillContainerResponse{} } +func (m *KillContainerResponse) String() string { return proto.CompactTextString(m) } +func (*KillContainerResponse) ProtoMessage() {} +func (*KillContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +type PauseContainerRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *PauseContainerRequest) Reset() { *m = PauseContainerRequest{} } +func (m *PauseContainerRequest) String() string { return proto.CompactTextString(m) } +func (*PauseContainerRequest) ProtoMessage() {} +func (*PauseContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *PauseContainerRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type PauseContainerResponse struct { +} + +func (m *PauseContainerResponse) Reset() { *m = PauseContainerResponse{} } +func (m *PauseContainerResponse) String() string { return proto.CompactTextString(m) } +func (*PauseContainerResponse) ProtoMessage() {} +func (*PauseContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type ResumeContainerRequest struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *ResumeContainerRequest) Reset() { *m = ResumeContainerRequest{} } +func (m *ResumeContainerRequest) String() string { return proto.CompactTextString(m) } +func (*ResumeContainerRequest) ProtoMessage() {} +func (*ResumeContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *ResumeContainerRequest) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type ResumeContainerResponse struct { +} + +func (m *ResumeContainerResponse) Reset() { *m = ResumeContainerResponse{} } +func (m *ResumeContainerResponse) String() string { return proto.CompactTextString(m) } +func (*ResumeContainerResponse) ProtoMessage() {} +func (*ResumeContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func init() { + proto.RegisterType((*StartContainerRequest)(nil), "moby.core.services.containers.runtime.v1.StartContainerRequest") + proto.RegisterType((*StartContainerResponse)(nil), "moby.core.services.containers.runtime.v1.StartContainerResponse") + proto.RegisterType((*KillContainerRequest)(nil), "moby.core.services.containers.runtime.v1.KillContainerRequest") + proto.RegisterType((*KillContainerResponse)(nil), "moby.core.services.containers.runtime.v1.KillContainerResponse") + proto.RegisterType((*PauseContainerRequest)(nil), "moby.core.services.containers.runtime.v1.PauseContainerRequest") + proto.RegisterType((*PauseContainerResponse)(nil), "moby.core.services.containers.runtime.v1.PauseContainerResponse") + proto.RegisterType((*ResumeContainerRequest)(nil), "moby.core.services.containers.runtime.v1.ResumeContainerRequest") + proto.RegisterType((*ResumeContainerResponse)(nil), "moby.core.services.containers.runtime.v1.ResumeContainerResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for ContainerRuntimeService service + +type ContainerRuntimeServiceClient interface { + StartContainer(ctx context.Context, in *StartContainerRequest, opts ...grpc.CallOption) (*StartContainerResponse, error) + KillContainer(ctx context.Context, in *KillContainerRequest, opts ...grpc.CallOption) (*KillContainerResponse, error) + PauseContainer(ctx context.Context, in *PauseContainerRequest, opts ...grpc.CallOption) (*PauseContainerResponse, error) + ResumeContainer(ctx context.Context, in *ResumeContainerRequest, opts ...grpc.CallOption) (*ResumeContainerResponse, error) +} + +type containerRuntimeServiceClient struct { + cc *grpc.ClientConn +} + +func NewContainerRuntimeServiceClient(cc *grpc.ClientConn) ContainerRuntimeServiceClient { + return &containerRuntimeServiceClient{cc} +} + +func (c *containerRuntimeServiceClient) StartContainer(ctx context.Context, in *StartContainerRequest, opts ...grpc.CallOption) (*StartContainerResponse, error) { + out := new(StartContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/StartContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerRuntimeServiceClient) KillContainer(ctx context.Context, in *KillContainerRequest, opts ...grpc.CallOption) (*KillContainerResponse, error) { + out := new(KillContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/KillContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerRuntimeServiceClient) PauseContainer(ctx context.Context, in *PauseContainerRequest, opts ...grpc.CallOption) (*PauseContainerResponse, error) { + out := new(PauseContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/PauseContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerRuntimeServiceClient) ResumeContainer(ctx context.Context, in *ResumeContainerRequest, opts ...grpc.CallOption) (*ResumeContainerResponse, error) { + out := new(ResumeContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/ResumeContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for ContainerRuntimeService service + +type ContainerRuntimeServiceServer interface { + StartContainer(context.Context, *StartContainerRequest) (*StartContainerResponse, error) + KillContainer(context.Context, *KillContainerRequest) (*KillContainerResponse, error) + PauseContainer(context.Context, *PauseContainerRequest) (*PauseContainerResponse, error) + ResumeContainer(context.Context, *ResumeContainerRequest) (*ResumeContainerResponse, error) +} + +func RegisterContainerRuntimeServiceServer(s *grpc.Server, srv ContainerRuntimeServiceServer) { + s.RegisterService(&_ContainerRuntimeService_serviceDesc, srv) +} + +func _ContainerRuntimeService_StartContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerRuntimeServiceServer).StartContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/StartContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerRuntimeServiceServer).StartContainer(ctx, req.(*StartContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerRuntimeService_KillContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(KillContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerRuntimeServiceServer).KillContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/KillContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerRuntimeServiceServer).KillContainer(ctx, req.(*KillContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerRuntimeService_PauseContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PauseContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerRuntimeServiceServer).PauseContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/PauseContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerRuntimeServiceServer).PauseContainer(ctx, req.(*PauseContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerRuntimeService_ResumeContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResumeContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerRuntimeServiceServer).ResumeContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.runtime.v1.ContainerRuntimeService/ResumeContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerRuntimeServiceServer).ResumeContainer(ctx, req.(*ResumeContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ContainerRuntimeService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "moby.core.services.containers.runtime.v1.ContainerRuntimeService", + HandlerType: (*ContainerRuntimeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StartContainer", + Handler: _ContainerRuntimeService_StartContainer_Handler, + }, + { + MethodName: "KillContainer", + Handler: _ContainerRuntimeService_KillContainer_Handler, + }, + { + MethodName: "PauseContainer", + Handler: _ContainerRuntimeService_PauseContainer_Handler, + }, + { + MethodName: "ResumeContainer", + Handler: _ContainerRuntimeService_ResumeContainer_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/moby/moby/components/api/services/containers/runtime/v1/runtime.proto", +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/services/containers/runtime/v1/runtime.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 421 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xc1, 0xae, 0x93, 0x40, + 0x14, 0x7d, 0xf8, 0xf4, 0xbd, 0xbc, 0x6b, 0xaa, 0x66, 0x62, 0x29, 0x25, 0xd1, 0x34, 0xac, 0x1a, + 0x17, 0x33, 0x69, 0xbb, 0x34, 0xb1, 0x6a, 0xdd, 0xb9, 0x69, 0xa8, 0x6e, 0xdc, 0x01, 0x1d, 0x71, + 0x12, 0x98, 0x41, 0x66, 0x86, 0xa4, 0xbf, 0x61, 0x62, 0xe2, 0xd2, 0xdf, 0x74, 0x67, 0x60, 0xa0, + 0x58, 0xc4, 0xa4, 0xad, 0xdd, 0x90, 0x3b, 0x70, 0xcf, 0x39, 0x97, 0x73, 0xcf, 0xc0, 0x3a, 0x66, + 0xea, 0x8b, 0x0e, 0x71, 0x24, 0x52, 0x92, 0x8a, 0x70, 0x67, 0x1e, 0x91, 0x48, 0x33, 0xc1, 0x29, + 0x57, 0x92, 0x04, 0x19, 0x23, 0x92, 0xe6, 0x05, 0x8b, 0xa8, 0x24, 0x91, 0xe0, 0x2a, 0x60, 0x9c, + 0xe6, 0x92, 0xe4, 0x9a, 0x2b, 0x96, 0x52, 0x52, 0xcc, 0x9a, 0x12, 0x67, 0xb9, 0x50, 0x02, 0x4d, + 0x4b, 0x06, 0x1c, 0x89, 0x9c, 0xe2, 0x06, 0x87, 0x5b, 0x1c, 0x6e, 0x9a, 0x8b, 0x99, 0xbb, 0x3a, + 0x46, 0x5b, 0xed, 0xb2, 0x3f, 0x85, 0xdb, 0xca, 0xc8, 0xb9, 0xcf, 0x63, 0x21, 0xe2, 0x84, 0x92, + 0xea, 0x14, 0xea, 0xcf, 0x64, 0xab, 0xf3, 0x40, 0x31, 0xc1, 0xcd, 0x77, 0xef, 0x03, 0x0c, 0x37, + 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, 0x67, 0xe3, 0xf7, 0x43, 0x95, 0x66, 0x1d, 0x6e, 0xf5, 0x14, + 0xb3, 0x7a, 0x53, 0x76, 0x8a, 0x59, 0xff, 0x08, 0xd4, 0x15, 0xfa, 0x61, 0xc1, 0xe3, 0xce, 0xf2, + 0xd1, 0x09, 0xbc, 0xfd, 0x71, 0x74, 0xdf, 0xfc, 0x07, 0x43, 0x33, 0xda, 0xdb, 0xbb, 0x4f, 0xb7, + 0x75, 0x5f, 0x78, 0x53, 0xdd, 0xda, 0xc5, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x60, 0xe3, + 0x70, 0x90, 0x05, 0x00, 0x00, +} diff --git a/components/services/containers/runtime/v1/runtime.proto b/components/api/services/containers/runtime/v1/runtime.proto similarity index 90% rename from components/services/containers/runtime/v1/runtime.proto rename to components/api/services/containers/runtime/v1/runtime.proto index 4b2d4c3ee6419..5313d887ad799 100644 --- a/components/services/containers/runtime/v1/runtime.proto +++ b/components/api/services/containers/runtime/v1/runtime.proto @@ -2,8 +2,9 @@ syntax = "proto3"; package moby.core.services.containers.runtime.v1; -import "types/container/container.proto"; -import "google/protobuf/timestamp.proto"; +option go_package = "runtime"; + +import "github.com/moby/moby/components/api/types/container/container.proto"; import "google/protobuf/duration.proto"; service ContainerRuntimeService { diff --git a/components/api/services/containers/store/v1/doc.go b/components/api/services/containers/store/v1/doc.go new file mode 100644 index 0000000000000..72440ea2a61d8 --- /dev/null +++ b/components/api/services/containers/store/v1/doc.go @@ -0,0 +1 @@ +package store diff --git a/components/api/services/containers/store/v1/store.pb.go b/components/api/services/containers/store/v1/store.pb.go new file mode 100644 index 0000000000000..7e2e143455da3 --- /dev/null +++ b/components/api/services/containers/store/v1/store.pb.go @@ -0,0 +1,518 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/services/containers/store/v1/store.proto + +/* +Package store is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/services/containers/store/v1/store.proto + +It has these top-level messages: + CreateContainerRequest + CreateContainerResponse + UpdateContainerRequest + UpdateContainerResponse + DeleteContainerRequest + DeleteContainerResponse + GetContainerRequest + GetContainerResponse + Filters + ListContainersRequest + ListContainersResponse +*/ +package store + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import moby_core_v1_types "github.com/moby/moby/components/api/types/container" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type CreateContainerRequest struct { + Spec *moby_core_v1_types.ContainerSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"` + Annotations *moby_core_v1_types.Annotations `protobuf:"bytes,2,opt,name=annotations" json:"annotations,omitempty"` +} + +func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } +func (m *CreateContainerRequest) String() string { return proto.CompactTextString(m) } +func (*CreateContainerRequest) ProtoMessage() {} +func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *CreateContainerRequest) GetSpec() *moby_core_v1_types.ContainerSpec { + if m != nil { + return m.Spec + } + return nil +} + +func (m *CreateContainerRequest) GetAnnotations() *moby_core_v1_types.Annotations { + if m != nil { + return m.Annotations + } + return nil +} + +type CreateContainerResponse struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } +func (m *CreateContainerResponse) String() string { return proto.CompactTextString(m) } +func (*CreateContainerResponse) ProtoMessage() {} +func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *CreateContainerResponse) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type UpdateContainerRequest struct { + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` + Version *moby_core_v1_types.Version `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + Spec *moby_core_v1_types.ContainerSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"` +} + +func (m *UpdateContainerRequest) Reset() { *m = UpdateContainerRequest{} } +func (m *UpdateContainerRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateContainerRequest) ProtoMessage() {} +func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *UpdateContainerRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +func (m *UpdateContainerRequest) GetVersion() *moby_core_v1_types.Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *UpdateContainerRequest) GetSpec() *moby_core_v1_types.ContainerSpec { + if m != nil { + return m.Spec + } + return nil +} + +type UpdateContainerResponse struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *UpdateContainerResponse) Reset() { *m = UpdateContainerResponse{} } +func (m *UpdateContainerResponse) String() string { return proto.CompactTextString(m) } +func (*UpdateContainerResponse) ProtoMessage() {} +func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *UpdateContainerResponse) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type DeleteContainerRequest struct { + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` +} + +func (m *DeleteContainerRequest) Reset() { *m = DeleteContainerRequest{} } +func (m *DeleteContainerRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteContainerRequest) ProtoMessage() {} +func (*DeleteContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *DeleteContainerRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +type DeleteContainerResponse struct { +} + +func (m *DeleteContainerResponse) Reset() { *m = DeleteContainerResponse{} } +func (m *DeleteContainerResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteContainerResponse) ProtoMessage() {} +func (*DeleteContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type GetContainerRequest struct { + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` +} + +func (m *GetContainerRequest) Reset() { *m = GetContainerRequest{} } +func (m *GetContainerRequest) String() string { return proto.CompactTextString(m) } +func (*GetContainerRequest) ProtoMessage() {} +func (*GetContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *GetContainerRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +type GetContainerResponse struct { + Container *moby_core_v1_types.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` +} + +func (m *GetContainerResponse) Reset() { *m = GetContainerResponse{} } +func (m *GetContainerResponse) String() string { return proto.CompactTextString(m) } +func (*GetContainerResponse) ProtoMessage() {} +func (*GetContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *GetContainerResponse) GetContainer() *moby_core_v1_types.Container { + if m != nil { + return m.Container + } + return nil +} + +type Filters struct { + ContainerIds []string `protobuf:"bytes,3,rep,name=container_ids,json=containerIds" json:"container_ids,omitempty"` + Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Names []string `protobuf:"bytes,5,rep,name=names" json:"names,omitempty"` +} + +func (m *Filters) Reset() { *m = Filters{} } +func (m *Filters) String() string { return proto.CompactTextString(m) } +func (*Filters) ProtoMessage() {} +func (*Filters) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *Filters) GetContainerIds() []string { + if m != nil { + return m.ContainerIds + } + return nil +} + +func (m *Filters) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *Filters) GetNames() []string { + if m != nil { + return m.Names + } + return nil +} + +type ListContainersRequest struct { + Filters *Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"` +} + +func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} } +func (m *ListContainersRequest) String() string { return proto.CompactTextString(m) } +func (*ListContainersRequest) ProtoMessage() {} +func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *ListContainersRequest) GetFilters() *Filters { + if m != nil { + return m.Filters + } + return nil +} + +type ListContainersResponse struct { + Containers []*moby_core_v1_types.Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` +} + +func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} } +func (m *ListContainersResponse) String() string { return proto.CompactTextString(m) } +func (*ListContainersResponse) ProtoMessage() {} +func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +func (m *ListContainersResponse) GetContainers() []*moby_core_v1_types.Container { + if m != nil { + return m.Containers + } + return nil +} + +func init() { + proto.RegisterType((*CreateContainerRequest)(nil), "moby.core.services.containers.store.v1.CreateContainerRequest") + proto.RegisterType((*CreateContainerResponse)(nil), "moby.core.services.containers.store.v1.CreateContainerResponse") + proto.RegisterType((*UpdateContainerRequest)(nil), "moby.core.services.containers.store.v1.UpdateContainerRequest") + proto.RegisterType((*UpdateContainerResponse)(nil), "moby.core.services.containers.store.v1.UpdateContainerResponse") + proto.RegisterType((*DeleteContainerRequest)(nil), "moby.core.services.containers.store.v1.DeleteContainerRequest") + proto.RegisterType((*DeleteContainerResponse)(nil), "moby.core.services.containers.store.v1.DeleteContainerResponse") + proto.RegisterType((*GetContainerRequest)(nil), "moby.core.services.containers.store.v1.GetContainerRequest") + proto.RegisterType((*GetContainerResponse)(nil), "moby.core.services.containers.store.v1.GetContainerResponse") + proto.RegisterType((*Filters)(nil), "moby.core.services.containers.store.v1.Filters") + proto.RegisterType((*ListContainersRequest)(nil), "moby.core.services.containers.store.v1.ListContainersRequest") + proto.RegisterType((*ListContainersResponse)(nil), "moby.core.services.containers.store.v1.ListContainersResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for ContainerStore service + +type ContainerStoreClient interface { + CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) + UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) + DeleteContainer(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*DeleteContainerResponse, error) + GetContainer(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error) + ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) +} + +type containerStoreClient struct { + cc *grpc.ClientConn +} + +func NewContainerStoreClient(cc *grpc.ClientConn) ContainerStoreClient { + return &containerStoreClient{cc} +} + +func (c *containerStoreClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) { + out := new(CreateContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.store.v1.ContainerStore/CreateContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerStoreClient) UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) { + out := new(UpdateContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.store.v1.ContainerStore/UpdateContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerStoreClient) DeleteContainer(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*DeleteContainerResponse, error) { + out := new(DeleteContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.store.v1.ContainerStore/DeleteContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerStoreClient) GetContainer(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error) { + out := new(GetContainerResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.store.v1.ContainerStore/GetContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *containerStoreClient) ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) { + out := new(ListContainersResponse) + err := grpc.Invoke(ctx, "/moby.core.services.containers.store.v1.ContainerStore/ListContainers", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for ContainerStore service + +type ContainerStoreServer interface { + CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error) + UpdateContainer(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error) + DeleteContainer(context.Context, *DeleteContainerRequest) (*DeleteContainerResponse, error) + GetContainer(context.Context, *GetContainerRequest) (*GetContainerResponse, error) + ListContainers(context.Context, *ListContainersRequest) (*ListContainersResponse, error) +} + +func RegisterContainerStoreServer(s *grpc.Server, srv ContainerStoreServer) { + s.RegisterService(&_ContainerStore_serviceDesc, srv) +} + +func _ContainerStore_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerStoreServer).CreateContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.store.v1.ContainerStore/CreateContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerStoreServer).CreateContainer(ctx, req.(*CreateContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerStore_UpdateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerStoreServer).UpdateContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.store.v1.ContainerStore/UpdateContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerStoreServer).UpdateContainer(ctx, req.(*UpdateContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerStore_DeleteContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerStoreServer).DeleteContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.store.v1.ContainerStore/DeleteContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerStoreServer).DeleteContainer(ctx, req.(*DeleteContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerStore_GetContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerStoreServer).GetContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.store.v1.ContainerStore/GetContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerStoreServer).GetContainer(ctx, req.(*GetContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContainerStore_ListContainers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListContainersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContainerStoreServer).ListContainers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.core.services.containers.store.v1.ContainerStore/ListContainers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContainerStoreServer).ListContainers(ctx, req.(*ListContainersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ContainerStore_serviceDesc = grpc.ServiceDesc{ + ServiceName: "moby.core.services.containers.store.v1.ContainerStore", + HandlerType: (*ContainerStoreServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateContainer", + Handler: _ContainerStore_CreateContainer_Handler, + }, + { + MethodName: "UpdateContainer", + Handler: _ContainerStore_UpdateContainer_Handler, + }, + { + MethodName: "DeleteContainer", + Handler: _ContainerStore_DeleteContainer_Handler, + }, + { + MethodName: "GetContainer", + Handler: _ContainerStore_GetContainer_Handler, + }, + { + MethodName: "ListContainers", + Handler: _ContainerStore_ListContainers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/moby/moby/components/api/services/containers/store/v1/store.proto", +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/services/containers/store/v1/store.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 609 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xdf, 0x6e, 0xd3, 0x30, + 0x14, 0xc6, 0xc9, 0xda, 0xae, 0xea, 0x69, 0x19, 0xc8, 0x94, 0x2e, 0x04, 0xa1, 0x75, 0x41, 0x42, + 0xbd, 0x4a, 0xd4, 0xa2, 0x49, 0x83, 0xb1, 0xa1, 0xae, 0xfc, 0xd1, 0xa4, 0x5e, 0x79, 0x02, 0x04, + 0x42, 0x42, 0x69, 0x6a, 0x4a, 0x44, 0x6b, 0x87, 0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6f, 0xdc, 0x50, 0x08, 0x00, + 0x00, +} diff --git a/components/services/containers/store/v1/store.proto b/components/api/services/containers/store/v1/store.proto similarity index 93% rename from components/services/containers/store/v1/store.proto rename to components/api/services/containers/store/v1/store.proto index b5d4135e274ef..79aae64588033 100644 --- a/components/services/containers/store/v1/store.proto +++ b/components/api/services/containers/store/v1/store.proto @@ -2,9 +2,10 @@ syntax = "proto3"; package moby.core.services.containers.store.v1; +option go_package = "store"; + import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "types/container/container.proto"; +import "github.com/moby/moby/components/api/types/container/container.proto"; service ContainerStore { rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse); diff --git a/components/api/types/container/container.pb.go b/components/api/types/container/container.pb.go new file mode 100644 index 0000000000000..f4b2cb0d24d2f --- /dev/null +++ b/components/api/types/container/container.pb.go @@ -0,0 +1,207 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/types/container/container.proto + +/* +Package container is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/types/container/container.proto + +It has these top-level messages: + ContainerSpec + Version + Meta + Annotations + Container +*/ +package container + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import google_protobuf1 "github.com/gogo/protobuf/types" +import google_protobuf2 "github.com/golang/protobuf/ptypes/any" + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type ContainerSpec struct { + Annotations *Annotations `protobuf:"bytes,3,opt,name=annotations" json:"annotations,omitempty"` + Spec *google_protobuf2.Any `protobuf:"bytes,4,opt,name=spec" json:"spec,omitempty"` +} + +func (m *ContainerSpec) Reset() { *m = ContainerSpec{} } +func (m *ContainerSpec) String() string { return proto.CompactTextString(m) } +func (*ContainerSpec) ProtoMessage() {} +func (*ContainerSpec) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *ContainerSpec) GetAnnotations() *Annotations { + if m != nil { + return m.Annotations + } + return nil +} + +func (m *ContainerSpec) GetSpec() *google_protobuf2.Any { + if m != nil { + return m.Spec + } + return nil +} + +type Version struct { + Index uint64 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Version) GetIndex() uint64 { + if m != nil { + return m.Index + } + return 0 +} + +type Meta struct { + Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` + CreatedAt *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` + UpdatedAt *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` +} + +func (m *Meta) Reset() { *m = Meta{} } +func (m *Meta) String() string { return proto.CompactTextString(m) } +func (*Meta) ProtoMessage() {} +func (*Meta) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *Meta) GetVersion() *Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *Meta) GetCreatedAt() *google_protobuf1.Timestamp { + if m != nil { + return m.CreatedAt + } + return nil +} + +func (m *Meta) GetUpdatedAt() *google_protobuf1.Timestamp { + if m != nil { + return m.UpdatedAt + } + return nil +} + +type Annotations struct { + Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` + Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Annotations) Reset() { *m = Annotations{} } +func (m *Annotations) String() string { return proto.CompactTextString(m) } +func (*Annotations) ProtoMessage() {} +func (*Annotations) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Annotations) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Annotations) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +type Container struct { + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Spec *ContainerSpec `protobuf:"bytes,2,opt,name=spec" json:"spec,omitempty"` + Meta *Meta `protobuf:"bytes,3,opt,name=meta" json:"meta,omitempty"` +} + +func (m *Container) Reset() { *m = Container{} } +func (m *Container) String() string { return proto.CompactTextString(m) } +func (*Container) ProtoMessage() {} +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *Container) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Container) GetSpec() *ContainerSpec { + if m != nil { + return m.Spec + } + return nil +} + +func (m *Container) GetMeta() *Meta { + if m != nil { + return m.Meta + } + return nil +} + +func init() { + proto.RegisterType((*ContainerSpec)(nil), "moby.core.v1.types.ContainerSpec") + proto.RegisterType((*Version)(nil), "moby.core.v1.types.Version") + proto.RegisterType((*Meta)(nil), "moby.core.v1.types.Meta") + proto.RegisterType((*Annotations)(nil), "moby.core.v1.types.Annotations") + proto.RegisterType((*Container)(nil), "moby.core.v1.types.Container") +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/types/container/container.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 434 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x8e, 0xd3, 0x30, + 0x10, 0x86, 0x49, 0x1a, 0x76, 0xd5, 0x89, 0x40, 0xc8, 0xea, 0x21, 0x94, 0x43, 0x4b, 0x4e, 0x95, + 0x40, 0x8e, 0x28, 0x42, 0x62, 0xe1, 0x14, 0x2a, 0x6e, 0xc0, 0xc1, 0x20,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, 0x9f, 0x56, 0x72, 0x4a, 0x1b, 0x77, 0xca, 0x2c, 0x55, + 0x9c, 0xd9, 0x14, 0x9f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x26, 0x7b, 0x39, 0x1f, 0x35, 0x03, + 0x00, 0x00, +} diff --git a/components/types/container/container.proto b/components/api/types/container/container.proto similarity index 100% rename from components/types/container/container.proto rename to components/api/types/container/container.proto diff --git a/components/api/types/container/doc.go b/components/api/types/container/doc.go new file mode 100644 index 0000000000000..92b957153dec1 --- /dev/null +++ b/components/api/types/container/doc.go @@ -0,0 +1 @@ +package container diff --git a/components/api/types/doc.go b/components/api/types/doc.go new file mode 100644 index 0000000000000..ab1254f4c2bef --- /dev/null +++ b/components/api/types/doc.go @@ -0,0 +1 @@ +package types diff --git a/components/api/types/file.pb.go b/components/api/types/file.pb.go new file mode 100644 index 0000000000000..9a3cb0b635e38 --- /dev/null +++ b/components/api/types/file.pb.go @@ -0,0 +1,105 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/moby/moby/components/api/types/file.proto + +/* +Package types is a generated protocol buffer package. + +It is generated from these files: + github.com/moby/moby/components/api/types/file.proto + +It has these top-level messages: + FileInfo +*/ +package types + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/golang/protobuf/ptypes/any" +import google_protobuf1 "github.com/gogo/protobuf/types" + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +type FileInfo struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` + Mode uint32 `protobuf:"varint,3,opt,name=mode" json:"mode,omitempty"` + ModifiedAt *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=modified_at,json=modifiedAt" json:"modified_at,omitempty"` + Sys *google_protobuf.Any `protobuf:"bytes,5,opt,name=sys" json:"sys,omitempty"` +} + +func (m *FileInfo) Reset() { *m = FileInfo{} } +func (m *FileInfo) String() string { return proto.CompactTextString(m) } +func (*FileInfo) ProtoMessage() {} +func (*FileInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *FileInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FileInfo) GetSize() int64 { + if m != nil { + return m.Size + } + return 0 +} + +func (m *FileInfo) GetMode() uint32 { + if m != nil { + return m.Mode + } + return 0 +} + +func (m *FileInfo) GetModifiedAt() *google_protobuf1.Timestamp { + if m != nil { + return m.ModifiedAt + } + return nil +} + +func (m *FileInfo) GetSys() *google_protobuf.Any { + if m != nil { + return m.Sys + } + return nil +} + +func init() { + proto.RegisterType((*FileInfo)(nil), "moby.core.types.v1.FileInfo") +} + +func init() { + proto.RegisterFile("github.com/moby/moby/components/api/types/file.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x8d, 0x3f, 0x4b, 0xc5, 0x30, + 0x14, 0xc5, 0x89, 0x7d, 0x8a, 0xe6, 0xe1, 0x12, 0x1c, 0x62, 0x17, 0x8b, 0x83, 0x74, 0x4a, 0xf0, + 0xcf, 0xe6, 0xf4, 0x16, 0xc1, 0x35, 0xb8, 0x4b, 0xda, 0xde, 0xd6, 0x40, 0x93, 0x1b, 0x5e, 0x52, + 0x21, 0x7e, 0x25, 0xbf, 0xa4, 0x34, 0xa1, 0x8b, 0x6f, 0xb9, 0x1c, 0xce, 0xfd, 0x1d, 0x7e, 0xf4, + 0x65, 0x32, 0xf1, 0x6b, 0xe9, 0x44, 0x8f, 0x56, 0x5a, 0xec, 0x52, 0x39, 0x3d, 0x5a, 0x8f, 0x0e, + 0x5c, 0x0c, 0x52, 0x7b, 0x23, 0x63, 0xf2, 0x10, 0xe4, 0x68, 0x66, 0x10, 0xfe, 0x88, 0x11, 0x19, + 0x5b, 0x29, 0xd1, 0xe3, 0x11, 0x44, 0xfe, 0x89, 0xef, 0xc7, 0xfa, 0x76, 0x42, 0x9c, 0x66, 0x90, + 0x99, 0xe8, 0x96, 0x51, 0x6a, 0x97, 0x0a, 0x5e, 0xdf, 0xfd, 0x7f, 0x45, 0x63, 0x21, 0x44, 0x6d, + 0x7d, 0x01, 0xee, 0x7f, 0x09, 0xbd, 0x7c, 0x33, 0x33, 0xbc, 0xbb, 0x11, 0x19, 0xa3, 0x3b, 0xa7, + 0x2d, 0x70, 0xd2, 0x90, 0xf6, 0x4a, 0xe5, 0xbc, 0x76, 0xc1, 0xfc, 0x00, 0x3f, 0x6b, 0x48, 0x5b, + 0xa9, 0x9c, 0xd7, 0xce, 0xe2, 0x00, 0xbc, 0x6a, 0x48, 0x7b, 0xad, 0x72, 0x66, 0xaf, 0x74, 0x6f, + 0x71, 0x30, 0xa3, 0x81, 0xe1, 0x53, 0x47, 0xbe, 0x6b, 0x48, 0xbb, 0x7f, 0xaa, 0x45, 0xf1, 0x8b, + 0xcd, 0x2f, 0x3e, 0x36, 0xbf, 0xa2, 0x1b, 0x7e, 0x88, 0xec, 0x81, 0x56, 0x21, 0x05, 0x7e, 0x9e, + 0x47, 0x37, 0x27, 0xa3, 0x83, 0x4b, 0x6a, 0x05, 0xba, 0x8b, 0x5c, 0x3d, 0xff, 0x05, 0x00, 0x00, + 0xff, 0xff, 0xba, 0xf2, 0xf6, 0xbc, 0x3c, 0x01, 0x00, 0x00, +} diff --git a/components/types/file.proto b/components/api/types/file.proto similarity index 100% rename from components/types/file.proto rename to components/api/types/file.proto diff --git a/components/architecture.md b/components/architecture.md index 0f7eca9724d89..d0f1bcc94acf8 100644 --- a/components/architecture.md +++ b/components/architecture.md @@ -31,8 +31,8 @@ own right. A component: - MUST provide a GRPC endpoint with the following services on a node-local socket (such as a unix socket or named pipe): - MUST provide [GRPC healthcheck service](https://github.com/grpc/grpc/blob/master/doc/health-checking.md) - - MUST provide [Version service](services/component/version/v1) - - SHOULD provide [Metrics service](services/component/metrics/v1) + - MUST provide [Version service](api/services/component/version/v1) + - SHOULD provide [Metrics service](api/services/component/metrics/v1) - MAY expose a separate API for external consumption - SHOULD use GRPC to publish component-level services - SHOULD be easily deployed as a container (the primary packaging format for @@ -127,7 +127,7 @@ TBD #### Other -See the [service definitions](services) for these services. +See the [service definitions](api/services) for these services. TODO: - metrics diff --git a/components/services/containers/rootfs/v1/rootfs.proto b/components/services/containers/rootfs/v1/rootfs.proto deleted file mode 100644 index 35d5d20e69d89..0000000000000 --- a/components/services/containers/rootfs/v1/rootfs.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package moby.core.services.containers.rootfs.v1; - -import "types/container/container.proto"; -import "types/file.proto"; - -service RootfsService { - rpc ExtractRootfsArchive (ExtractRootfsArchiveRequest) returns (ExtractRootfsArchiveResponse) {} - rpc FetchRootfs (FetchRootfsRequest) returns (FetchRootfsResponse) {} - rpc StatRootfs (StatRootfsRequest) returns (StatRootfsResponse) {} - rpc DiffRootfs (DiffRootfsRequest) returns (DiffRootfsResponse) {} -} - -message ExtractRootfsArchiveRequest { - moby.core.v1.types.Container container = 1; - string target = 2; - // the archive ??? -} - -message ExtractRootfsArchiveResponse {} - -message FetchRootfsRequest { - moby.core.v1.types.Container container = 1; - string target = 2; -} - -message FetchRootfsResponse { - // the archive ??? -} - -message StatRootfsRequest { - moby.core.v1.types.Container container = 1; - string target = 2; -} - -message StatRootfsResponse { - moby.core.types.v1.FileInfo info = 1; -} - -message DiffRootfsRequest { - moby.core.v1.types.Container container = 1; -} - -message DiffRootfsResponse { - -} \ No newline at end of file From c528d9a7bb24d3b1543eea310649baa8bcec49c2 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 24 Aug 2017 16:47:11 -0400 Subject: [PATCH 3/3] Ignore component/ dir for unit tests Signed-off-by: Brian Goff --- hack/test/unit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/test/unit b/hack/test/unit index 2b07089bcfe97..7094554bfd686 100755 --- a/hack/test/unit +++ b/hack/test/unit @@ -16,7 +16,7 @@ TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}" BUILDFLAGS=( -tags "netgo seccomp libdm_no_deferred_remove" ) TESTDIRS="${TESTDIRS:-"./..."}" -exclude_paths="/vendor/|/integration" +exclude_paths="/vendor/|/integration|/component" if [ "$(go env GOHOSTOS)" = 'solaris' ]; then exclude_paths="$exclude_paths|/daemon/graphdriver" fi