diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md deleted file mode 100644 index bec57e0a75..0000000000 --- a/vendor/cloud.google.com/go/CHANGES.md +++ /dev/null @@ -1,1024 +0,0 @@ -# Changes - -## v0.34.0 - -- functions/metadata: - - Switch to using JSON in context. - - Make Resource a value. -- vision: Fix ProductSearch return type. -- datastore: Add an example for how to handle MultiError. - -## v0.33.1 - -- compute: Removes an erroneously added go.mod. -- logging: Populate source location in fromLogEntry. - -## v0.33.0 - -- bttest: - - Add support for apply_label_transformer. -- expr: - - Add expr library. -- firestore: - - Support retrieval of missing documents. -- kms: - - Add IAM methods. -- pubsub: - - Clarify extension documentation. -- scheduler: - - Add v1beta1 client. -- vision: - - Add product search helper. - - Add new product search client. - -## v0.32.0 - -Note: This release is the last to support Go 1.6 and 1.8. - -- bigquery: - - Add support for removing an expiration. - - Ignore NeverExpire in Table.Create. - - Validate table expiration time. -- cbt: - - Add note about not supporting arbitrary bytes. -- datastore: - - Align key checks. -- firestore: - - Return an error when using Start/End without providing values. -- pubsub: - - Add pstest Close method. - - Clarify MaxExtension documentation. -- securitycenter: - - Add v1beta1 client. -- spanner: - - Allow nil in mutations. - - Improve doc of SessionPoolConfig.MaxOpened. - - Increase session deletion timeout from 5s to 15s. - -## v0.31.0 - -- bigtable: - - Group mutations across multiple requests. -- bigquery: - - Link to bigquery troubleshooting errors page in bigquery.Error comment. -- cbt: - - Fix go generate command. - - Document usage of both maxage + maxversions. -- datastore: - - Passing nil keys results in ErrInvalidKey. -- firestore: - - Clarify what Document.DataTo does with untouched struct fields. -- profile: - - Validate service name in agent. -- pubsub: - - Fix deadlock with pstest and ctx.Cancel. - - Fix a possible deadlock in pstest. -- trace: - - Update doc URL with new fragment. - -Special thanks to @fastest963 for going above and beyond helping us to debug -hard-to-reproduce Pub/Sub issues. - -## v0.30.0 - -- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information. -- bigtable: bttest supports row sample filter. -- functions: metadata package added for accessing Cloud Functions resource metadata. - -## v0.29.0 - -- bigtable: - - Add retry to all idempotent RPCs. - - cbt supports complex GC policies. - - Emulator supports arbitrary bytes in regex filters. -- firestore: Add ArrayUnion and ArrayRemove. -- logging: Add the ContextFunc option to supply the context used for - asynchronous RPCs. -- profiler: Ignore NotDefinedError when fetching the instance name -- pubsub: - - BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled. - - BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning. - - Fix deadlock. - - Restore Ack/Nack/Modacks metrics. - - Improve context handling in iterator. - - Implement synchronous mode for Receive. - - pstest: add Pull. -- spanner: Add a metric for the number of sessions currently opened. -- storage: - - Canceling the context releases all resources. - - Add additional RetentionPolicy attributes. -- vision/apiv1: Add LocalizeObjects method. - -## v0.28.0 - -- bigtable: - - Emulator returns Unimplemented for snapshot RPCs. -- bigquery: - - Support zero-length repeated, nested fields. -- cloud assets: - - Add v1beta client. -- datastore: - - Don't nil out transaction ID on retry. -- firestore: - - BREAKING CHANGE: When watching a query with Query.Snapshots, QuerySnapshotIterator.Next - returns a QuerySnapshot which contains read time, result size, change list and the DocumentIterator - (previously, QuerySnapshotIterator.Next returned just the DocumentIterator). See: https://godoc.org/cloud.google.com/go/firestore#Query.Snapshots. - - Add array-contains operator. -- IAM: - - Add iam/credentials/apiv1 client. -- pubsub: - - Canceling the context passed to Subscription.Receive causes Receive to return when - processing finishes on all messages currently in progress, even if new messages are arriving. -- redis: - - Add redis/apiv1 client. -- storage: - - Add Reader.Attrs. - - Deprecate several Reader getter methods: please use Reader.Attrs for these instead. - - Add ObjectHandle.Bucket and ObjectHandle.Object methods. - -## v0.27.0 - -- bigquery: - - Allow modification of encryption configuration and partitioning options to a table via the Update call. - - Add a SchemaFromJSON function that converts a JSON table schema. -- bigtable: - - Restore cbt count functionality. -- containeranalysis: - - Add v1beta client. -- spanner: - - Fix a case where an iterator might not be closed correctly. -- storage: - - Add ServiceAccount method https://godoc.org/cloud.google.com/go/storage#Client.ServiceAccount. - - Add a method to Reader that returns the parsed value of the Last-Modified header. - -## v0.26.0 - -- bigquery: - - Support filtering listed jobs by min/max creation time. - - Support data clustering (https://godoc.org/cloud.google.com/go/bigquery#Clustering). - - Include job creator email in Job struct. -- bigtable: - - Add `RowSampleFilter`. - - emulator: BREAKING BEHAVIOR CHANGE: Regexps in row, family, column and value filters - must match the entire target string to succeed. Previously, the emulator was - succeeding on partial matches. - NOTE: As of this release, this change only affects the emulator when run - from this repo (bigtable/cmd/emulator/cbtemulator.go). The version launched - from `gcloud` will be updated in a subsequent `gcloud` release. -- dataproc: Add apiv1beta2 client. -- datastore: Save non-nil pointer fields on omitempty. -- logging: populate Entry.Trace from the HTTP X-Cloud-Trace-Context header. -- logging/logadmin: Support writer_identity and include_children. -- pubsub: - - Support labels on topics and subscriptions. - - Support message storage policy for topics. - - Use the distribution of ack times to determine when to extend ack deadlines. - The only user-visible effect of this change should be that programs that - call only `Subscription.Receive` need no IAM permissions other than `Pub/Sub - Subscriber`. -- storage: - - Support predefined ACLs. - - Support additional ACL fields other than Entity and Role. - - Support bucket websites. - - Support bucket logging. - - -## v0.25.0 - -- Added [Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CODE_OF_CONDUCT.md) -- bigtable: - - cbt: Support a GC policy of "never". -- errorreporting: - - Support User. - - Close now calls Flush. - - Use OnError (previously ignored). - - Pass through the RPC error as-is to OnError. -- httpreplay: A tool for recording and replaying HTTP requests - (for the bigquery and storage clients in this repo). -- kms: v1 client added -- logging: add SourceLocation to Entry. -- storage: improve CRC checking on read. - -## v0.24.0 - -- bigquery: Support for the NUMERIC type. -- bigtable: - - cbt: Optionally specify columns for read/lookup - - Support instance-level administration. -- oslogin: New client for the OS Login API. -- pubsub: - - The package is now stable. There will be no further breaking changes. - - Internal changes to improve Subscription.Receive behavior. -- storage: Support updating bucket lifecycle config. -- spanner: Support struct-typed parameter bindings. -- texttospeech: New client for the Text-to-Speech API. - -## v0.23.0 - -- bigquery: Add DDL stats to query statistics. -- bigtable: - - cbt: Add cells-per-column limit for row lookup. - - cbt: Make it possible to combine read filters. -- dlp: v2beta2 client removed. Use the v2 client instead. -- firestore, spanner: Fix compilation errors due to protobuf changes. - -## v0.22.0 - -- bigtable: - - cbt: Support cells per column limit for row read. - - bttest: Correctly handle empty RowSet. - - Fix ReadModifyWrite operation in emulator. - - Fix API path in GetCluster. - -- bigquery: - - BEHAVIOR CHANGE: Retry on 503 status code. - - Add dataset.DeleteWithContents. - - Add SchemaUpdateOptions for query jobs. - - Add Timeline to QueryStatistics. - - Add more stats to ExplainQueryStage. - - Support Parquet data format. - -- datastore: - - Support omitempty for times. - -- dlp: - - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client, - which is now out of beta. - - Add v2 client. - -- firestore: - - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid. - -- iam: - - Support JWT signing via SignJwt callopt. - -- profiler: - - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done. - - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute. - - Avoid returning empty serial port output. - -- pubsub: - - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy. - - BEHAVIOR CHANGE: Don't backoff on EOF. - - pstest: Support Acknowledge and ModifyAckDeadline RPCs. - -- redis: - - Add v1 beta Redis client. - -- spanner: - - Support SessionLabels. - -- speech: - - Add api v1 beta1 client. - -- storage: - - BEHAVIOR CHANGE: Retry reads when retryable error occurs. - - Fix delete of object in requester-pays bucket. - - Support KMS integration. - -## v0.21.0 - -- bigquery: - - Add OpenCensus tracing. - -- firestore: - - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot - whose Exists method returns false. DocumentRef.Get and Transaction.Get - return the non-nil DocumentSnapshot in addition to a NotFound error. - **DocumentRef.GetAll and Transaction.GetAll return a non-nil - DocumentSnapshot instead of nil.** - - Add DocumentIterator.Stop. **Call Stop whenever you are done with a - DocumentIterator.** - - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime - notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen. - - Canceling an RPC now always returns a grpc.Status with codes.Canceled. - -- spanner: - - Add `CommitTimestamp`, which supports inserting the commit timestamp of a - transaction into a column. - -## v0.20.0 - -- bigquery: Support SchemaUpdateOptions for load jobs. - -- bigtable: - - Add SampleRowKeys. - - cbt: Support union, intersection GCPolicy. - - Retry admin RPCS. - - Add trace spans to retries. - -- datastore: Add OpenCensus tracing. - -- firestore: - - Fix queries involving Null and NaN. - - Allow Timestamp protobuffers for time values. - -- logging: Add a WriteTimeout option. - -- spanner: Support Batch API. - -- storage: Add OpenCensus tracing. - -## v0.19.0 - -- bigquery: - - Support customer-managed encryption keys. - -- bigtable: - - Improved emulator support. - - Support GetCluster. - -- datastore: - - Add general mutations. - - Support pointer struct fields. - - Support transaction options. - -- firestore: - - Add Transaction.GetAll. - - Support document cursors. - -- logging: - - Support concurrent RPCs to the service. - - Support per-entry resources. - -- profiler: - - Add config options to disable heap and thread profiling. - - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set. - -- pubsub: - - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the - callback returns). - - Add SubscriptionInProject. - - Add OpenCensus instrumentation for streaming pull. - -- storage: - - Support CORS. - -## v0.18.0 - -- bigquery: - - Marked stable. - - Schema inference of nullable fields supported. - - Added TimePartitioning to QueryConfig. - -- firestore: Data provided to DocumentRef.Set with a Merge option can contain - Delete sentinels. - -- logging: Clients can accept parent resources other than projects. - -- pubsub: - - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome. - - Support updating more subscription metadata: AckDeadline, - RetainAckedMessages and RetentionDuration. - -- oslogin/apiv1beta: New client for the Cloud OS Login API. - -- rpcreplay: A package for recording and replaying gRPC traffic. - -- spanner: - - Add a ReadWithOptions that supports a row limit, as well as an index. - - Support query plan and execution statistics. - - Added [OpenCensus](http://opencensus.io) support. - -- storage: Clarify checksum validation for gzipped files (it is not validated - when the file is served uncompressed). - - -## v0.17.0 - -- firestore BREAKING CHANGES: - - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update. - Change - `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})` - to - `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})` - - Change - `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)` - to - `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})` - - Rename MergePaths to Merge; require args to be FieldPaths - - A value stored as an integer can be read into a floating-point field, and vice versa. -- bigtable/cmd/cbt: - - Support deleting a column. - - Add regex option for row read. -- spanner: Mark stable. -- storage: - - Add Reader.ContentEncoding method. - - Fix handling of SignedURL headers. -- bigquery: - - If Uploader.Put is called with no rows, it returns nil without making a - call. - - Schema inference supports the "nullable" option in struct tags for - non-required fields. - - TimePartitioning supports "Field". - - -## v0.16.0 - -- Other bigquery changes: - - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE). - - UseStandardSQL is deprecated; set UseLegacySQL to true if you need - Legacy SQL. - - Uploader.Put will generate a random insert ID if you do not provide one. - - Support time partitioning for load jobs. - - Support dry-run queries. - - A `Job` remembers its last retrieved status. - - Support retrieving job configuration. - - Support labels for jobs and tables. - - Support dataset access lists. - - Improve support for external data sources, including data from Bigtable and - Google Sheets, and tables with external data. - - Support updating a table's view configuration. - - Fix uploading civil times with nanoseconds. - -- storage: - - Support PubSub notifications. - - Support Requester Pays buckets. - -- profiler: Support goroutine and mutex profile types. - -## v0.15.0 - -- firestore: beta release. See the - [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html). - -- errorreporting: The existing package has been redesigned. - -- errors: This package has been removed. Use errorreporting. - - -## v0.14.0 - -- bigquery BREAKING CHANGES: - - Standard SQL is the default for queries and views. - - `Table.Create` takes `TableMetadata` as a second argument, instead of - options. - - `Dataset.Create` takes `DatasetMetadata` as a second argument. - - `DatasetMetadata` field `ID` renamed to `FullID` - - `TableMetadata` field `ID` renamed to `FullID` - -- Other bigquery changes: - - The client will append a random suffix to a provided job ID if you set - `AddJobIDSuffix` to true in a job config. - - Listing jobs is supported. - - Better retry logic. - -- vision, language, speech: clients are now stable - -- monitoring: client is now beta - -- profiler: - - Rename InstanceName to Instance, ZoneName to Zone - - Auto-detect service name and version on AppEngine. - -## v0.13.0 - -- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these - options to continue using Legacy SQL after the client switches its default - to Standard SQL. - -- bigquery: Support for updating dataset labels. - -- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other - than the client's. DatasetsInProject is no longer needed and is deprecated. - -- bigtable: Fail ListInstances when any zones fail. - -- spanner: support decoding of slices of basic types (e.g. []string, []int64, - etc.) - -- logging/logadmin: UpdateSink no longer creates a sink if it is missing - (actually a change to the underlying service, not the client) - -- profiler: Service and ServiceVersion replace Target in Config. - -## v0.12.0 - -- pubsub: Subscription.Receive now uses streaming pull. - -- pubsub: add Client.TopicInProject to access topics in a different project - than the client. - -- errors: renamed errorreporting. The errors package will be removed shortly. - -- datastore: improved retry behavior. - -- bigquery: support updates to dataset metadata, with etags. - -- bigquery: add etag support to Table.Update (BREAKING: etag argument added). - -- bigquery: generate all job IDs on the client. - -- storage: support bucket lifecycle configurations. - - -## v0.11.0 - -- Clients for spanner, pubsub and video are now in beta. - -- New client for DLP. - -- spanner: performance and testing improvements. - -- storage: requester-pays buckets are supported. - -- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements. - -- pubsub: bug fixes and other minor improvements - -## v0.10.0 - -- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update. - -- pubsub: Subscription.Receive now runs concurrently for higher throughput. - -- vision: cloud.google.com/go/vision is deprecated. Use -cloud.google.com/go/vision/apiv1 instead. - -- translation: now stable. - -- trace: several changes to the surface. See the link below. - -### Code changes required from v0.9.0 - -- pubsub: Replace - - ``` - sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"}) - ``` - - with - - ``` - sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ - PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"}, - }) - ``` - -- trace: traceGRPCServerInterceptor will be provided from *trace.Client. -Given an initialized `*trace.Client` named `tc`, instead of - - ``` - s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc))) - ``` - - write - - ``` - s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor())) - ``` - -- trace trace.GRPCClientInterceptor will also provided from *trace.Client. -Instead of - - ``` - conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor())) - ``` - - write - - ``` - conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())) - ``` - -- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC -interceptor as a dial option as shown below when initializing Cloud package -clients: - - ``` - c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))) - if err != nil { - ... - } - ``` - - -## v0.9.0 - -- Breaking changes to some autogenerated clients. -- rpcreplay package added. - -## v0.8.0 - -- profiler package added. -- storage: - - Retry Objects.Insert call. - - Add ProgressFunc to WRiter. -- pubsub: breaking changes: - - Publish is now asynchronous ([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)). - - Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)). - - Message.Done replaced with Message.Ack and Message.Nack. - -## v0.7.0 - -- Release of a client library for Spanner. See -the -[blog -post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html). -Note that although the Spanner service is beta, the Go client library is alpha. - -## v0.6.0 - -- Beta release of BigQuery, DataStore, Logging and Storage. See the -[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). - -- bigquery: - - struct support. Read a row directly into a struct with -`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`. -You can also use field tags. See the [package documentation][cloud-bigquery-ref] -for details. - - - The `ValueList` type was removed. It is no longer necessary. Instead of - ```go - var v ValueList - ... it.Next(&v) .. - ``` - use - - ```go - var v []Value - ... it.Next(&v) ... - ``` - - - Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or - `ValueList` would append to the slice. Now each call resets the size to zero first. - - - Schema inference will infer the SQL type BYTES for a struct field of - type []byte. Previously it inferred STRING. - - - The types `uint`, `uint64` and `uintptr` are no longer supported in schema - inference. BigQuery's integer type is INT64, and those types may hold values - that are not correctly represented in a 64-bit signed integer. - -## v0.5.0 - -- bigquery: - - The SQL types DATE, TIME and DATETIME are now supported. They correspond to - the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil` - package. - - Support for query parameters. - - Support deleting a dataset. - - Values from INTEGER columns will now be returned as int64, not int. This - will avoid errors arising from large values on 32-bit systems. -- datastore: - - Nested Go structs encoded as Entity values, instead of a -flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg. - ```go - type State struct { - Cities []struct{ - Populations []int - } - } - ``` - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for -more details. - - Contexts no longer hold namespaces; instead you must set a key's namespace - explicitly. Also, key functions have been changed and renamed. - - The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method: - ```go - q := datastore.NewQuery("Kind").Namespace("ns") - ``` - - All the fields of Key are exported. That means you can construct any Key with a struct literal: - ```go - k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} - ``` - - As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed. - - `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace - ```go - NewIncompleteKey(ctx, kind, parent) - ``` - with - ```go - IncompleteKey(kind, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. - - `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace - ```go - NewKey(ctx, kind, name, 0, parent) - NewKey(ctx, kind, "", id, parent) - ``` - with - ```go - NameKey(kind, name, parent) - IDKey(kind, id, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. - - The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`. - - The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection. - - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for -more details. - -## v0.4.0 - -- bigquery: - -`NewGCSReference` is now a function, not a method on `Client`. - - `Table.LoaderFrom` now accepts a `ReaderSource`, enabling - loading data into a table from a file or any `io.Reader`. - * Client.Table and Client.OpenTable have been removed. - Replace - ```go - client.OpenTable("project", "dataset", "table") - ``` - with - ```go - client.DatasetInProject("project", "dataset").Table("table") - ``` - - * Client.CreateTable has been removed. - Replace - ```go - client.CreateTable(ctx, "project", "dataset", "table") - ``` - with - ```go - client.DatasetInProject("project", "dataset").Table("table").Create(ctx) - ``` - - * Dataset.ListTables have been replaced with Dataset.Tables. - Replace - ```go - tables, err := ds.ListTables(ctx) - ``` - with - ```go - it := ds.Tables(ctx) - for { - table, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: use table. - } - ``` - - * Client.Read has been replaced with Job.Read, Table.Read and Query.Read. - Replace - ```go - it, err := client.Read(ctx, job) - ``` - with - ```go - it, err := job.Read(ctx) - ``` - and similarly for reading from tables or queries. - - * The iterator returned from the Read methods is now named RowIterator. Its - behavior is closer to the other iterators in these libraries. It no longer - supports the Schema method; see the next item. - Replace - ```go - for it.Next(ctx) { - var vals ValueList - if err := it.Get(&vals); err != nil { - // TODO: Handle error. - } - // TODO: use vals. - } - if err := it.Err(); err != nil { - // TODO: Handle error. - } - ``` - with - ``` - for { - var vals ValueList - err := it.Next(&vals) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: use vals. - } - ``` - Instead of the `RecordsPerRequest(n)` option, write - ```go - it.PageInfo().MaxSize = n - ``` - Instead of the `StartIndex(i)` option, write - ```go - it.StartIndex = i - ``` - - * ValueLoader.Load now takes a Schema in addition to a slice of Values. - Replace - ```go - func (vl *myValueLoader) Load(v []bigquery.Value) - ``` - with - ```go - func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema) - ``` - - - * Table.Patch is replace by Table.Update. - Replace - ```go - p := table.Patch() - p.Description("new description") - metadata, err := p.Apply(ctx) - ``` - with - ```go - metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{ - Description: "new description", - }) - ``` - - * Client.Copy is replaced by separate methods for each of its four functions. - All options have been replaced by struct fields. - - * To load data from Google Cloud Storage into a table, use Table.LoaderFrom. - - Replace - ```go - client.Copy(ctx, table, gcsRef) - ``` - with - ```go - table.LoaderFrom(gcsRef).Run(ctx) - ``` - Instead of passing options to Copy, set fields on the Loader: - ```go - loader := table.LoaderFrom(gcsRef) - loader.WriteDisposition = bigquery.WriteTruncate - ``` - - * To extract data from a table into Google Cloud Storage, use - Table.ExtractorTo. Set fields on the returned Extractor instead of - passing options. - - Replace - ```go - client.Copy(ctx, gcsRef, table) - ``` - with - ```go - table.ExtractorTo(gcsRef).Run(ctx) - ``` - - * To copy data into a table from one or more other tables, use - Table.CopierFrom. Set fields on the returned Copier instead of passing options. - - Replace - ```go - client.Copy(ctx, dstTable, srcTable) - ``` - with - ```go - dst.Table.CopierFrom(srcTable).Run(ctx) - ``` - - * To start a query job, create a Query and call its Run method. Set fields - on the query instead of passing options. - - Replace - ```go - client.Copy(ctx, table, query) - ``` - with - ```go - query.Run(ctx) - ``` - - * Table.NewUploader has been renamed to Table.Uploader. Instead of options, - configure an Uploader by setting its fields. - Replace - ```go - u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) - ``` - with - ```go - u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) - u.IgnoreUnknownValues = true - ``` - -- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where `iterator` is the package -`google.golang.org/api/iterator`. - -## v0.3.0 - -- storage: - * AdminClient replaced by methods on Client. - Replace - ```go - adminClient.CreateBucket(ctx, bucketName, attrs) - ``` - with - ```go - client.Bucket(bucketName).Create(ctx, projectID, attrs) - ``` - - * BucketHandle.List replaced by BucketHandle.Objects. - Replace - ```go - for query != nil { - objs, err := bucket.List(d.ctx, query) - if err != nil { ... } - query = objs.Next - for _, obj := range objs.Results { - fmt.Println(obj) - } - } - ``` - with - ```go - iter := bucket.Objects(d.ctx, query) - for { - obj, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { ... } - fmt.Println(obj) - } - ``` - (The `iterator` package is at `google.golang.org/api/iterator`.) - - Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`. - - Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`. - - - * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. - Replace - ```go - attrs, err := src.CopyTo(ctx, dst, nil) - ``` - with - ```go - attrs, err := dst.CopierFrom(src).Run(ctx) - ``` - - Replace - ```go - attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"}) - ``` - with - ```go - c := dst.CopierFrom(src) - c.ContextType = "text/html" - attrs, err := c.Run(ctx) - ``` - - * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. - Replace - ```go - attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil) - ``` - with - ```go - attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) - ``` - - * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. - Replace - ```go - attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"}) - ``` - with - ```go - attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) - ``` - - * ObjectHandle.WithConditions replaced by ObjectHandle.If. - Replace - ```go - obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen)) - ``` - with - ```go - obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen}) - ``` - - Replace - ```go - obj.WithConditions(storage.IfGenerationMatch(0)) - ``` - with - ```go - obj.If(storage.Conditions{DoesNotExist: true}) - ``` - - * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`). - -- Package preview/logging deleted. Use logging instead. - -## v0.2.0 - -- Logging client replaced with preview version (see below). - -- New clients for some of Google's Machine Learning APIs: Vision, Speech, and -Natural Language. - -- Preview version of a new [Stackdriver Logging][cloud-logging] client in -[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging). -This client uses gRPC as its transport layer, and supports log reading, sinks -and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly. - - diff --git a/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md b/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md deleted file mode 100644 index 8fd1bc9c22..0000000000 --- a/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,44 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) - diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md deleted file mode 100644 index eef41ed0fd..0000000000 --- a/vendor/cloud.google.com/go/CONTRIBUTING.md +++ /dev/null @@ -1,234 +0,0 @@ -# Contributing - -1. Sign one of the contributor license agreements below. -1. `go get golang.org/x/review/git-codereview` to install the code reviewing -tool. - 1. You will need to ensure that your `GOBIN` directory (by default - `$GOPATH/bin`) is in your `PATH` so that git can find the command. - 1. If you would like, you may want to set up aliases for git-codereview, - such that `git codereview change` becomes `git change`. See the - [godoc](https://godoc.org/golang.org/x/review/git-codereview) for details. - 1. Should you run into issues with the git-codereview tool, please note - that all error messages will assume that you have set up these aliases. -1. Get the cloud package by running `go get -d cloud.google.com/go`. - 1. If you have already checked out the source, make sure that the remote - git origin is https://code.googlesource.com/gocloud: - - ``` - git remote set-url origin https://code.googlesource.com/gocloud - ``` - -1. Make sure your auth is configured correctly by visiting -https://code.googlesource.com, clicking "Generate Password", and following the -directions. -1. Make changes and create a change by running `git codereview change `, -provide a commit message, and use `git codereview mail` to create a Gerrit CL. -1. Keep amending to the change with `git codereview change` and mail as your -receive feedback. Each new mailed amendment will create a new patch set for -your change in Gerrit. - -## Integration Tests - -In addition to the unit tests, you may run the integration test suite. These -directions describe setting up your environment to run integration tests for -_all_ packages: note that many of these instructions may be redundant if you -intend only to run integration tests on a single package. - -#### GCP Setup - -To run the integrations tests, creation and configuration of two projects in -the Google Developers Console is required: one specifically for Firestore -integration tests, and another for all other integration tests. We'll refer to -these projects as "general project" and "Firestore project". - -After creating each project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) -for each project. Ensure the project-level **Owner** -[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to -each service account. During the creation of the service account, you should -download the JSON credential file for use later. - -Next, ensure the following APIs are enabled in the general project: - -- BigQuery API -- BigQuery Data Transfer API -- Cloud Dataproc API -- Cloud Dataproc Control API Private -- Cloud Datastore API -- Cloud Firestore API -- Cloud Key Management Service (KMS) API -- Cloud Natural Language API -- Cloud OS Login API -- Cloud Pub/Sub API -- Cloud Resource Manager API -- Cloud Spanner API -- Cloud Speech API -- Cloud Translation API -- Cloud Video Intelligence API -- Cloud Vision API -- Compute Engine API -- Compute Engine Instance Group Manager API -- Container Registry API -- Firebase Rules API -- Google Cloud APIs -- Google Cloud Deployment Manager V2 API -- Google Cloud SQL -- Google Cloud Storage -- Google Cloud Storage JSON API -- Google Compute Engine Instance Group Updater API -- Google Compute Engine Instance Groups API -- Kubernetes Engine API -- Stackdriver Error Reporting API - -Next, create a Datastore database in the general project, and a Firestore -database in the Firestore project. - -Finally, in the general project, create an API key for the translate API: - -- Go to GCP Developer Console. -- Navigate to APIs & Services > Credentials. -- Click Create Credentials > API Key. -- Save this key for use in `GCLOUD_TESTS_API_KEY` as described below. - -#### Local Setup - -Once the two projects are created and configured, set the following environment -variables: - -- `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g. -bamboo-shift-455) for the general project. -- `GCLOUD_TESTS_GOLANG_KEY`: The path to the JSON key file of the general -project's service account. -- `GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID`: Developers Console project's ID -(e.g. doorway-cliff-677) for the Firestore project. -- `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the -Firestore project's service account. -- `GCLOUD_TESTS_GOLANG_KEYRING`: The full name of the keyring for the tests, -in the form -"projects/P/locations/L/keyRings/R". The creation of this is described below. -- `GCLOUD_TESTS_API_KEY`: API key for using the Translate API. -- `GCLOUD_TESTS_GOLANG_ZONE`: Compute Engine zone. - -Install the [gcloud command-line tool][gcloudcli] to your machine and use it to -create some resources used in integration tests. - -From the project's root directory: - -``` sh -# Sets the default project in your env. -$ gcloud config set project $GCLOUD_TESTS_GOLANG_PROJECT_ID - -# Authenticates the gcloud tool with your account. -$ gcloud auth login - -# Create the indexes used in the datastore integration tests. -$ gcloud datastore create-indexes datastore/testdata/index.yaml - -# Creates a Google Cloud storage bucket with the same name as your test project, -# and with the Stackdriver Logging service account as owner, for the sink -# integration tests in logging. -$ gsutil mb gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID -$ gsutil acl ch -g cloud-logs@google.com:O gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID - -# Creates a PubSub topic for integration tests of storage notifications. -$ gcloud beta pubsub topics create go-storage-notification-test -# Next, go to the Pub/Sub dashboard in GCP console. Authorize the user -# "service-@gs-project-accounts.iam.gserviceaccount.com" -# as a publisher to that topic. - -# Creates a Spanner instance for the spanner integration tests. -$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 10 --description 'Instance for go client test' -# NOTE: Spanner instances are priced by the node-hour, so you may want to -# delete the instance after testing with 'gcloud beta spanner instances delete'. - -$ export MY_KEYRING=some-keyring-name -$ export MY_LOCATION=global -# Creates a KMS keyring, in the same location as the default location for your -# project's buckets. -$ gcloud kms keyrings create $MY_KEYRING --location $MY_LOCATION -# Creates two keys in the keyring, named key1 and key2. -$ gcloud kms keys create key1 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption -$ gcloud kms keys create key2 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption -# Sets the GCLOUD_TESTS_GOLANG_KEYRING environment variable. -$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_LOCATION/keyRings/$MY_KEYRING -# Authorizes Google Cloud Storage to encrypt and decrypt using key1. -gsutil kms authorize -p $GCLOUD_TESTS_GOLANG_PROJECT_ID -k $GCLOUD_TESTS_GOLANG_KEYRING/cryptoKeys/key1 -``` - -#### Running - -Once you've done the necessary setup, you can run the integration tests by -running: - -``` sh -$ go test -v cloud.google.com/go/... -``` - -#### Replay - -Some packages can record the RPCs during integration tests to a file for -subsequent replay. To record, pass the `-record` flag to `go test`. The -recording will be saved to the _package_`.replay` file. To replay integration -tests from a saved recording, the replay file must be present, the `-short` -flag must be passed to `go test`, and the `GCLOUD_TESTS_GOLANG_ENABLE_REPLAY` -environment variable must have a non-empty value. - -## Contributor License Agreements - -Before we can accept your pull requests you'll need to sign a Contributor -License Agreement (CLA): - -- **If you are an individual writing original source code** and **you own the -intellectual property**, then you'll need to sign an [individual CLA][indvcla]. -- **If you work for a company that wants to allow you to contribute your -work**, then you'll need to sign a [corporate CLA][corpcla]. - -You can sign these electronically (just scroll to the bottom). After that, -we'll be able to accept your pull requests. - -## Contributor Code of Conduct - -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) - -[gcloudcli]: https://developers.google.com/cloud/sdk/gcloud/ -[indvcla]: https://developers.google.com/open-source/cla/individual -[corpcla]: https://developers.google.com/open-source/cla/corporate diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md deleted file mode 100644 index 1c8c16046a..0000000000 --- a/vendor/cloud.google.com/go/README.md +++ /dev/null @@ -1,505 +0,0 @@ -# Google Cloud Client Libraries for Go - -[![GoDoc](https://godoc.org/cloud.google.com/go?status.svg)](https://godoc.org/cloud.google.com/go) - -Go packages for [Google Cloud Platform](https://cloud.google.com) services. - -``` go -import "cloud.google.com/go" -``` - -To install the packages on your system, *do not clone the repo*. Instead use - -``` -$ go get -u cloud.google.com/go/... -``` - -**NOTE:** Some of these packages are under development, and may occasionally -make backwards-incompatible changes. - -**NOTE:** Github repo is a mirror of [https://code.googlesource.com/gocloud](https://code.googlesource.com/gocloud). - - * [News](#news) - * [Supported APIs](#supported-apis) - * [Go Versions Supported](#go-versions-supported) - * [Authorization](#authorization) - * [Cloud Datastore](#cloud-datastore-) - * [Cloud Storage](#cloud-storage-) - * [Cloud Pub/Sub](#cloud-pub-sub-) - * [BigQuery](#cloud-bigquery-) - * [Stackdriver Logging](#stackdriver-logging-) - * [Cloud Spanner](#cloud-spanner-) - - -## News - -_7 August 2018_ - -As of November 1, the code in the repo will no longer support Go versions 1.8 -and earlier. No one other than AppEngine users should be on those old versions, -and AppEngine -[Standard](https://groups.google.com/forum/#!topic/google-appengine-go/e7oPNomd7ak) -and -[Flex](https://groups.google.com/forum/#!topic/google-appengine-go/wHsYtxvEbXI) -will stop supporting new deployments with those versions on that date. - - -Changes have been moved to [CHANGES](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CHANGES.md). - - -## Supported APIs - -Google API | Status | Package ----------------------------------------------|--------------|----------------------------------------------------------- -[Asset][cloud-asset] | alpha | [`godoc.org/cloud.google.com/go/asset/v1beta`][cloud-asset-ref] -[BigQuery][cloud-bigquery] | stable | [`godoc.org/cloud.google.com/go/bigquery`][cloud-bigquery-ref] -[Bigtable][cloud-bigtable] | stable | [`godoc.org/cloud.google.com/go/bigtable`][cloud-bigtable-ref] -[Cloudtasks][cloud-tasks] | beta | [`godoc.org/cloud.google.com/go/cloudtasks/apiv2beta3`][cloud-tasks-ref] -[Container][cloud-container] | stable | [`godoc.org/cloud.google.com/go/container/apiv1`][cloud-container-ref] -[ContainerAnalysis][cloud-containeranalysis] | beta | [`godoc.org/cloud.google.com/go/containeranalysis/apiv1beta1`][cloud-containeranalysis-ref] -[Dataproc][cloud-dataproc] | stable | [`godoc.org/cloud.google.com/go/dataproc/apiv1`][cloud-dataproc-ref] -[Datastore][cloud-datastore] | stable | [`godoc.org/cloud.google.com/go/datastore`][cloud-datastore-ref] -[Debugger][cloud-debugger] | alpha | [`godoc.org/cloud.google.com/go/debugger/apiv2`][cloud-debugger-ref] -[Dialogflow][cloud-dialogflow] | alpha | [`godoc.org/cloud.google.com/go/dialogflow/apiv2`][cloud-dialogflow-ref] -[Data Loss Prevention][cloud-dlp] | alpha | [`godoc.org/cloud.google.com/go/dlp/apiv2`][cloud-dlp-ref] -[ErrorReporting][cloud-errors] | alpha | [`godoc.org/cloud.google.com/go/errorreporting`][cloud-errors-ref] -[Firestore][cloud-firestore] | beta | [`godoc.org/cloud.google.com/go/firestore`][cloud-firestore-ref] -[IAM][cloud-iam] | stable | [`godoc.org/cloud.google.com/go/iam`][cloud-iam-ref] -[KMS][cloud-kms] | stable | [`godoc.org/cloud.google.com/go/kms`][cloud-kms-ref] -[Natural Language][cloud-natural-language] | stable | [`godoc.org/cloud.google.com/go/language/apiv1`][cloud-natural-language-ref] -[Logging][cloud-logging] | stable | [`godoc.org/cloud.google.com/go/logging`][cloud-logging-ref] -[Monitoring][cloud-monitoring] | alpha | [`godoc.org/cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref] -[OS Login][cloud-oslogin] | alpha | [`cloud.google.com/compute/docs/oslogin/rest`][cloud-oslogin-ref] -[Pub/Sub][cloud-pubsub] | stable | [`godoc.org/cloud.google.com/go/pubsub`][cloud-pubsub-ref] -[Memorystore][cloud-memorystore] | stable | [`godoc.org/cloud.google.com/go/redis/apiv1beta1`][cloud-memorystore-ref] -[Spanner][cloud-spanner] | stable | [`godoc.org/cloud.google.com/go/spanner`][cloud-spanner-ref] -[Speech][cloud-speech] | stable | [`godoc.org/cloud.google.com/go/speech/apiv1`][cloud-speech-ref] -[Storage][cloud-storage] | stable | [`godoc.org/cloud.google.com/go/storage`][cloud-storage-ref] -[Text To Speech][cloud-texttospeech] | alpha | [`godoc.org/cloud.google.com/go/texttospeech/apiv1`][cloud-storage-ref] -[Trace][cloud-trace] | alpha | [`godoc.org/cloud.google.com/go/trace/apiv2`][cloud-translation-ref] -[Translation][cloud-translation] | stable | [`godoc.org/cloud.google.com/go/translate`][cloud-translation-ref] -[Video Intelligence][cloud-video] | alpha | [`godoc.org/cloud.google.com/go/videointelligence/apiv1beta1`][cloud-video-ref] -[Vision][cloud-vision] | stable | [`godoc.org/cloud.google.com/go/vision/apiv1`][cloud-vision-ref] - -> **Alpha status**: the API is still being actively developed. As a -> result, it might change in backward-incompatible ways and is not recommended -> for production use. -> -> **Beta status**: the API is largely complete, but still has outstanding -> features and bugs to be addressed. There may be minor backwards-incompatible -> changes where necessary. -> -> **Stable status**: the API is mature and ready for production use. We will -> continue addressing bugs and feature requests. - -Documentation and examples are available at -https://godoc.org/cloud.google.com/go - -Visit or join the -[google-api-go-announce group](https://groups.google.com/forum/#!forum/google-api-go-announce) -for updates on these packages. - -## Go Versions Supported - -We support the two most recent major versions of Go. If Google App Engine uses -an older version, we support that as well. - -## Authorization - -By default, each API will use [Google Application Default Credentials][default-creds] -for authorization credentials used in calling the API endpoints. This will allow your -application to run in many environments without requiring explicit configuration. - -[snip]:# (auth) -```go -client, err := storage.NewClient(ctx) -``` - -To authorize using a -[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys), -pass -[`option.WithCredentialsFile`](https://godoc.org/google.golang.org/api/option#WithCredentialsFile) -to the `NewClient` function of the desired package. For example: - -[snip]:# (auth-JSON) -```go -client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json")) -``` - -You can exert more control over authorization by using the -[`golang.org/x/oauth2`](https://godoc.org/golang.org/x/oauth2) package to -create an `oauth2.TokenSource`. Then pass -[`option.WithTokenSource`](https://godoc.org/google.golang.org/api/option#WithTokenSource) -to the `NewClient` function: -[snip]:# (auth-ts) -```go -tokenSource := ... -client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource)) -``` - -## Cloud Datastore [![GoDoc](https://godoc.org/cloud.google.com/go/datastore?status.svg)](https://godoc.org/cloud.google.com/go/datastore) - -- [About Cloud Datastore][cloud-datastore] -- [Activating the API for your project][cloud-datastore-activation] -- [API documentation][cloud-datastore-docs] -- [Go client documentation](https://godoc.org/cloud.google.com/go/datastore) -- [Complete sample program](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/datastore/tasks) - -### Example Usage - -First create a `datastore.Client` to use throughout your application: - -[snip]:# (datastore-1) -```go -client, err := datastore.NewClient(ctx, "my-project-id") -if err != nil { - log.Fatal(err) -} -``` - -Then use that client to interact with the API: - -[snip]:# (datastore-2) -```go -type Post struct { - Title string - Body string `datastore:",noindex"` - PublishedAt time.Time -} -keys := []*datastore.Key{ - datastore.NameKey("Post", "post1", nil), - datastore.NameKey("Post", "post2", nil), -} -posts := []*Post{ - {Title: "Post 1", Body: "...", PublishedAt: time.Now()}, - {Title: "Post 2", Body: "...", PublishedAt: time.Now()}, -} -if _, err := client.PutMulti(ctx, keys, posts); err != nil { - log.Fatal(err) -} -``` - -## Cloud Storage [![GoDoc](https://godoc.org/cloud.google.com/go/storage?status.svg)](https://godoc.org/cloud.google.com/go/storage) - -- [About Cloud Storage][cloud-storage] -- [API documentation][cloud-storage-docs] -- [Go client documentation](https://godoc.org/cloud.google.com/go/storage) -- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/storage) - -### Example Usage - -First create a `storage.Client` to use throughout your application: - -[snip]:# (storage-1) -```go -client, err := storage.NewClient(ctx) -if err != nil { - log.Fatal(err) -} -``` - -[snip]:# (storage-2) -```go -// Read the object1 from bucket. -rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx) -if err != nil { - log.Fatal(err) -} -defer rc.Close() -body, err := ioutil.ReadAll(rc) -if err != nil { - log.Fatal(err) -} -``` - -## Cloud Pub/Sub [![GoDoc](https://godoc.org/cloud.google.com/go/pubsub?status.svg)](https://godoc.org/cloud.google.com/go/pubsub) - -- [About Cloud Pubsub][cloud-pubsub] -- [API documentation][cloud-pubsub-docs] -- [Go client documentation](https://godoc.org/cloud.google.com/go/pubsub) -- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/pubsub) - -### Example Usage - -First create a `pubsub.Client` to use throughout your application: - -[snip]:# (pubsub-1) -```go -client, err := pubsub.NewClient(ctx, "project-id") -if err != nil { - log.Fatal(err) -} -``` - -Then use the client to publish and subscribe: - -[snip]:# (pubsub-2) -```go -// Publish "hello world" on topic1. -topic := client.Topic("topic1") -res := topic.Publish(ctx, &pubsub.Message{ - Data: []byte("hello world"), -}) -// The publish happens asynchronously. -// Later, you can get the result from res: -... -msgID, err := res.Get(ctx) -if err != nil { - log.Fatal(err) -} - -// Use a callback to receive messages via subscription1. -sub := client.Subscription("subscription1") -err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) { - fmt.Println(m.Data) - m.Ack() // Acknowledge that we've consumed the message. -}) -if err != nil { - log.Println(err) -} -``` - -## BigQuery [![GoDoc](https://godoc.org/cloud.google.com/go/bigquery?status.svg)](https://godoc.org/cloud.google.com/go/bigquery) - -- [About BigQuery][cloud-bigquery] -- [API documentation][cloud-bigquery-docs] -- [Go client documentation][cloud-bigquery-ref] -- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigquery) - -### Example Usage - -First create a `bigquery.Client` to use throughout your application: -[snip]:# (bq-1) -```go -c, err := bigquery.NewClient(ctx, "my-project-ID") -if err != nil { - // TODO: Handle error. -} -``` - -Then use that client to interact with the API: -[snip]:# (bq-2) -```go -// Construct a query. -q := c.Query(` - SELECT year, SUM(number) - FROM [bigquery-public-data:usa_names.usa_1910_2013] - WHERE name = "William" - GROUP BY year - ORDER BY year -`) -// Execute the query. -it, err := q.Read(ctx) -if err != nil { - // TODO: Handle error. -} -// Iterate through the results. -for { - var values []bigquery.Value - err := it.Next(&values) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(values) -} -``` - - -## Stackdriver Logging [![GoDoc](https://godoc.org/cloud.google.com/go/logging?status.svg)](https://godoc.org/cloud.google.com/go/logging) - -- [About Stackdriver Logging][cloud-logging] -- [API documentation][cloud-logging-docs] -- [Go client documentation][cloud-logging-ref] -- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/logging) - -### Example Usage - -First create a `logging.Client` to use throughout your application: -[snip]:# (logging-1) -```go -ctx := context.Background() -client, err := logging.NewClient(ctx, "my-project") -if err != nil { - // TODO: Handle error. -} -``` - -Usually, you'll want to add log entries to a buffer to be periodically flushed -(automatically and asynchronously) to the Stackdriver Logging service. -[snip]:# (logging-2) -```go -logger := client.Logger("my-log") -logger.Log(logging.Entry{Payload: "something happened!"}) -``` - -Close your client before your program exits, to flush any buffered log entries. -[snip]:# (logging-3) -```go -err = client.Close() -if err != nil { - // TODO: Handle error. -} -``` - -## Cloud Spanner [![GoDoc](https://godoc.org/cloud.google.com/go/spanner?status.svg)](https://godoc.org/cloud.google.com/go/spanner) - -- [About Cloud Spanner][cloud-spanner] -- [API documentation][cloud-spanner-docs] -- [Go client documentation](https://godoc.org/cloud.google.com/go/spanner) - -### Example Usage - -First create a `spanner.Client` to use throughout your application: - -[snip]:# (spanner-1) -```go -client, err := spanner.NewClient(ctx, "projects/P/instances/I/databases/D") -if err != nil { - log.Fatal(err) -} -``` - -[snip]:# (spanner-2) -```go -// Simple Reads And Writes -_, err = client.Apply(ctx, []*spanner.Mutation{ - spanner.Insert("Users", - []string{"name", "email"}, - []interface{}{"alice", "a@example.com"})}) -if err != nil { - log.Fatal(err) -} -row, err := client.Single().ReadRow(ctx, "Users", - spanner.Key{"alice"}, []string{"email"}) -if err != nil { - log.Fatal(err) -} -``` - - -## Contributing - -Contributions are welcome. Please, see the -[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md) -document for details. We're using Gerrit for our code reviews. Please don't open pull -requests against this repo, new pull requests will be automatically closed. - -Please note that this project is released with a Contributor Code of Conduct. -By participating in this project you agree to abide by its terms. -See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct) -for more information. - -[cloud-datastore]: https://cloud.google.com/datastore/ -[cloud-datastore-ref]: https://godoc.org/cloud.google.com/go/datastore -[cloud-datastore-docs]: https://cloud.google.com/datastore/docs -[cloud-datastore-activation]: https://cloud.google.com/datastore/docs/activate - -[cloud-firestore]: https://cloud.google.com/firestore/ -[cloud-firestore-ref]: https://godoc.org/cloud.google.com/go/firestore -[cloud-firestore-docs]: https://cloud.google.com/firestore/docs -[cloud-firestore-activation]: https://cloud.google.com/firestore/docs/activate - -[cloud-pubsub]: https://cloud.google.com/pubsub/ -[cloud-pubsub-ref]: https://godoc.org/cloud.google.com/go/pubsub -[cloud-pubsub-docs]: https://cloud.google.com/pubsub/docs - -[cloud-storage]: https://cloud.google.com/storage/ -[cloud-storage-ref]: https://godoc.org/cloud.google.com/go/storage -[cloud-storage-docs]: https://cloud.google.com/storage/docs -[cloud-storage-create-bucket]: https://cloud.google.com/storage/docs/cloud-console#_creatingbuckets - -[cloud-bigtable]: https://cloud.google.com/bigtable/ -[cloud-bigtable-ref]: https://godoc.org/cloud.google.com/go/bigtable - -[cloud-bigquery]: https://cloud.google.com/bigquery/ -[cloud-bigquery-docs]: https://cloud.google.com/bigquery/docs -[cloud-bigquery-ref]: https://godoc.org/cloud.google.com/go/bigquery - -[cloud-logging]: https://cloud.google.com/logging/ -[cloud-logging-docs]: https://cloud.google.com/logging/docs -[cloud-logging-ref]: https://godoc.org/cloud.google.com/go/logging - -[cloud-monitoring]: https://cloud.google.com/monitoring/ -[cloud-monitoring-ref]: https://godoc.org/cloud.google.com/go/monitoring/apiv3 - -[cloud-vision]: https://cloud.google.com/vision -[cloud-vision-ref]: https://godoc.org/cloud.google.com/go/vision/apiv1 - -[cloud-language]: https://cloud.google.com/natural-language -[cloud-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1 - -[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest -[cloud-oslogin-ref]: https://cloud.google.com/compute/docs/oslogin/rest - -[cloud-speech]: https://cloud.google.com/speech -[cloud-speech-ref]: https://godoc.org/cloud.google.com/go/speech/apiv1 - -[cloud-spanner]: https://cloud.google.com/spanner/ -[cloud-spanner-ref]: https://godoc.org/cloud.google.com/go/spanner -[cloud-spanner-docs]: https://cloud.google.com/spanner/docs - -[cloud-translation]: https://cloud.google.com/translation -[cloud-translation-ref]: https://godoc.org/cloud.google.com/go/translation - -[cloud-video]: https://cloud.google.com/video-intelligence/ -[cloud-video-ref]: https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1 - -[cloud-errors]: https://cloud.google.com/error-reporting/ -[cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errorreporting - -[cloud-container]: https://cloud.google.com/containers/ -[cloud-container-ref]: https://godoc.org/cloud.google.com/go/container/apiv1 - -[cloud-debugger]: https://cloud.google.com/debugger/ -[cloud-debugger-ref]: https://godoc.org/cloud.google.com/go/debugger/apiv2 - -[cloud-dlp]: https://cloud.google.com/dlp/ -[cloud-dlp-ref]: https://godoc.org/cloud.google.com/go/dlp/apiv2beta1 - -[default-creds]: https://developers.google.com/identity/protocols/application-default-credentials - -[cloud-dataproc]: https://cloud.google.com/dataproc/ -[cloud-dataproc-docs]: https://cloud.google.com/dataproc/docs -[cloud-dataproc-ref]: https://godoc.org/cloud.google.com/go/dataproc/apiv1 - -[cloud-iam]: https://cloud.google.com/iam/ -[cloud-iam-docs]: https://cloud.google.com/iam/docs -[cloud-iam-ref]: https://godoc.org/cloud.google.com/go/iam - -[cloud-kms]: https://cloud.google.com/kms/ -[cloud-kms-docs]: https://cloud.google.com/kms/docs -[cloud-kms-ref]: https://godoc.org/cloud.google.com/go/kms/apiv1 - -[cloud-natural-language]: https://cloud.google.com/natural-language/ -[cloud-natural-language-docs]: https://cloud.google.com/natural-language/docs -[cloud-natural-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1 - -[cloud-memorystore]: https://cloud.google.com/memorystore/ -[cloud-memorystore-docs]: https://cloud.google.com/memorystore/docs -[cloud-memorystore-ref]: https://godoc.org/cloud.google.com/go/redis/apiv1beta1 - -[cloud-texttospeech]: https://cloud.google.com/texttospeech/ -[cloud-texttospeech-docs]: https://cloud.google.com/texttospeech/docs -[cloud-texttospeech-ref]: https://godoc.org/cloud.google.com/go/texttospeech/apiv1 - -[cloud-trace]: https://cloud.google.com/trace/ -[cloud-trace-docs]: https://cloud.google.com/trace/docs -[cloud-trace-ref]: https://godoc.org/cloud.google.com/go/trace/apiv1 - -[cloud-dialogflow]: https://cloud.google.com/dialogflow-enterprise/ -[cloud-dialogflow-docs]: https://cloud.google.com/dialogflow-enterprise/docs/ -[cloud-dialogflow-ref]: https://godoc.org/cloud.google.com/go/dialogflow/apiv2 - -[cloud-containeranalysis]: https://cloud.google.com/container-registry/docs/container-analysis -[cloud-containeranalysis-docs]: https://cloud.google.com/container-analysis/api/reference/rest/ -[cloud-containeranalysis-ref]: https://godoc.org/cloud.google.com/go/devtools/containeranalysis/apiv1beta1 - -[cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory -[cloud-asset-docs]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory -[cloud-asset-ref]: https://godoc.org/cloud.google.com/go/asset/apiv1 - -[cloud-tasks]: https://cloud.google.com/tasks/ -[cloud-tasks-ref]: https://godoc.org/cloud.google.com/go/cloudtasks/apiv2beta3 diff --git a/vendor/cloud.google.com/go/RELEASING.md b/vendor/cloud.google.com/go/RELEASING.md deleted file mode 100644 index 1028a261a1..0000000000 --- a/vendor/cloud.google.com/go/RELEASING.md +++ /dev/null @@ -1,47 +0,0 @@ -# How to Create a New Release - -## Prerequisites - -Install [releasetool](https://github.com/googleapis/releasetool). - -## Create a release - -1. `cd` into the root directory, e.g., `~/go/src/cloud.google.com/go` -1. Checkout the master branch and ensure a clean and up-to-date state. - ``` - git checkout master - git pull --tags origin master - ``` -1. Run releasetool to generate a changelog from the last version. Note, - releasetool will prompt if the new version is a major, minor, or patch - version. - ``` - releasetool start --language go - ``` -1. Format the output to match CHANGES.md. -1. Submit a CL with the changes in CHANGES.md. The commit message should look - like this (where `v0.31.0` is instead the correct version number): - ``` - all: Release v0.31.0 - ``` -1. Wait for approval from all reviewers and then submit the CL. -1. Return to the master branch and pull the release commit. - ``` - git checkout master - git pull origin master - ``` -1. Tag the current commit with the new version (e.g., `v0.31.0`) - ``` - releasetool tag --language go - ``` -1. Publish the tag to GoogleSource (i.e., origin): - ``` - git push origin $NEW_VERSION - ``` -1. Visit the [releases page][releases] on GitHub and click the "Draft a new - release" button. For tag version, enter the tag published in the previous - step. For the release title, use the version (e.g., `v0.31.0`). For the - description, copy the changes added to CHANGES.md. - - -[releases]: https://github.com/GoogleCloudPlatform/google-cloud-go/releases diff --git a/vendor/cloud.google.com/go/issue_template.md b/vendor/cloud.google.com/go/issue_template.md deleted file mode 100644 index e2ccef3e78..0000000000 --- a/vendor/cloud.google.com/go/issue_template.md +++ /dev/null @@ -1,17 +0,0 @@ -(delete this for feature requests) - -## Client - -e.g. PubSub - -## Describe Your Environment - -e.g. Alpine Docker on GKE - -## Expected Behavior - -e.g. Messages arrive really fast. - -## Actual Behavior - -e.g. Messages arrive really slowly. \ No newline at end of file diff --git a/vendor/cloud.google.com/go/keys.tar.enc b/vendor/cloud.google.com/go/keys.tar.enc deleted file mode 100644 index c54408c93a..0000000000 Binary files a/vendor/cloud.google.com/go/keys.tar.enc and /dev/null differ diff --git a/vendor/cloud.google.com/go/old-news.md b/vendor/cloud.google.com/go/old-news.md deleted file mode 100644 index 6a8b84d7fb..0000000000 --- a/vendor/cloud.google.com/go/old-news.md +++ /dev/null @@ -1,698 +0,0 @@ -_February 26, 2018_ - -*v0.19.0* - -- bigquery: - - Support customer-managed encryption keys. - -- bigtable: - - Improved emulator support. - - Support GetCluster. - -- datastore: - - Add general mutations. - - Support pointer struct fields. - - Support transaction options. - -- firestore: - - Add Transaction.GetAll. - - Support document cursors. - -- logging: - - Support concurrent RPCs to the service. - - Support per-entry resources. - -- profiler: - - Add config options to disable heap and thread profiling. - - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set. - -- pubsub: - - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the - callback returns). - - Add SubscriptionInProject. - - Add OpenCensus instrumentation for streaming pull. - -- storage: - - Support CORS. - - -_January 18, 2018_ - -*v0.18.0* - -- bigquery: - - Marked stable. - - Schema inference of nullable fields supported. - - Added TimePartitioning to QueryConfig. - -- firestore: Data provided to DocumentRef.Set with a Merge option can contain - Delete sentinels. - -- logging: Clients can accept parent resources other than projects. - -- pubsub: - - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome. - - Support updating more subscription metadata: AckDeadline, - RetainAckedMessages and RetentionDuration. - -- oslogin/apiv1beta: New client for the Cloud OS Login API. - -- rpcreplay: A package for recording and replaying gRPC traffic. - -- spanner: - - Add a ReadWithOptions that supports a row limit, as well as an index. - - Support query plan and execution statistics. - - Added [OpenCensus](http://opencensus.io) support. - -- storage: Clarify checksum validation for gzipped files (it is not validated - when the file is served uncompressed). - - -_December 11, 2017_ - -*v0.17.0* - -- firestore BREAKING CHANGES: - - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update. - Change - `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})` - to - `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})` - - Change - `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)` - to - `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})` - - Rename MergePaths to Merge; require args to be FieldPaths - - A value stored as an integer can be read into a floating-point field, and vice versa. -- bigtable/cmd/cbt: - - Support deleting a column. - - Add regex option for row read. -- spanner: Mark stable. -- storage: - - Add Reader.ContentEncoding method. - - Fix handling of SignedURL headers. -- bigquery: - - If Uploader.Put is called with no rows, it returns nil without making a - call. - - Schema inference supports the "nullable" option in struct tags for - non-required fields. - - TimePartitioning supports "Field". - - -_October 30, 2017_ - -*v0.16.0* - -- Other bigquery changes: - - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE). - - UseStandardSQL is deprecated; set UseLegacySQL to true if you need - Legacy SQL. - - Uploader.Put will generate a random insert ID if you do not provide one. - - Support time partitioning for load jobs. - - Support dry-run queries. - - A `Job` remembers its last retrieved status. - - Support retrieving job configuration. - - Support labels for jobs and tables. - - Support dataset access lists. - - Improve support for external data sources, including data from Bigtable and - Google Sheets, and tables with external data. - - Support updating a table's view configuration. - - Fix uploading civil times with nanoseconds. - -- storage: - - Support PubSub notifications. - - Support Requester Pays buckets. - -- profiler: Support goroutine and mutex profile types. - - -_October 3, 2017_ - -*v0.15.0* - -- firestore: beta release. See the - [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html). - -- errorreporting: The existing package has been redesigned. - -- errors: This package has been removed. Use errorreporting. - - -_September 28, 2017_ - -*v0.14.0* - -- bigquery BREAKING CHANGES: - - Standard SQL is the default for queries and views. - - `Table.Create` takes `TableMetadata` as a second argument, instead of - options. - - `Dataset.Create` takes `DatasetMetadata` as a second argument. - - `DatasetMetadata` field `ID` renamed to `FullID` - - `TableMetadata` field `ID` renamed to `FullID` - -- Other bigquery changes: - - The client will append a random suffix to a provided job ID if you set - `AddJobIDSuffix` to true in a job config. - - Listing jobs is supported. - - Better retry logic. - -- vision, language, speech: clients are now stable - -- monitoring: client is now beta - -- profiler: - - Rename InstanceName to Instance, ZoneName to Zone - - Auto-detect service name and version on AppEngine. - -_September 8, 2017_ - -*v0.13.0* - -- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these - options to continue using Legacy SQL after the client switches its default - to Standard SQL. - -- bigquery: Support for updating dataset labels. - -- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other - than the client's. DatasetsInProject is no longer needed and is deprecated. - -- bigtable: Fail ListInstances when any zones fail. - -- spanner: support decoding of slices of basic types (e.g. []string, []int64, - etc.) - -- logging/logadmin: UpdateSink no longer creates a sink if it is missing - (actually a change to the underlying service, not the client) - -- profiler: Service and ServiceVersion replace Target in Config. - -_August 22, 2017_ - -*v0.12.0* - -- pubsub: Subscription.Receive now uses streaming pull. - -- pubsub: add Client.TopicInProject to access topics in a different project - than the client. - -- errors: renamed errorreporting. The errors package will be removed shortly. - -- datastore: improved retry behavior. - -- bigquery: support updates to dataset metadata, with etags. - -- bigquery: add etag support to Table.Update (BREAKING: etag argument added). - -- bigquery: generate all job IDs on the client. - -- storage: support bucket lifecycle configurations. - - -_July 31, 2017_ - -*v0.11.0* - -- Clients for spanner, pubsub and video are now in beta. - -- New client for DLP. - -- spanner: performance and testing improvements. - -- storage: requester-pays buckets are supported. - -- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements. - -- pubsub: bug fixes and other minor improvements - -_June 17, 2017_ - - -*v0.10.0* - -- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update. - -- pubsub: Subscription.Receive now runs concurrently for higher throughput. - -- vision: cloud.google.com/go/vision is deprecated. Use -cloud.google.com/go/vision/apiv1 instead. - -- translation: now stable. - -- trace: several changes to the surface. See the link below. - -[Code changes required from v0.9.0.](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/MIGRATION.md) - - -_March 17, 2017_ - -Breaking Pubsub changes. -* Publish is now asynchronous -([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)). -* Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)). -* Message.Done replaced with Message.Ack and Message.Nack. - -_February 14, 2017_ - -Release of a client library for Spanner. See -the -[blog post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html). - -Note that although the Spanner service is beta, the Go client library is alpha. - -_December 12, 2016_ - -Beta release of BigQuery, DataStore, Logging and Storage. See the -[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). - -Also, BigQuery now supports structs. Read a row directly into a struct with -`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`. -You can also use field tags. See the [package documentation][cloud-bigquery-ref] -for details. - -_December 5, 2016_ - -More changes to BigQuery: - -* The `ValueList` type was removed. It is no longer necessary. Instead of - ```go - var v ValueList - ... it.Next(&v) .. - ``` - use - - ```go - var v []Value - ... it.Next(&v) ... - ``` - -* Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or - `ValueList` would append to the slice. Now each call resets the size to zero first. - -* Schema inference will infer the SQL type BYTES for a struct field of - type []byte. Previously it inferred STRING. - -* The types `uint`, `uint64` and `uintptr` are no longer supported in schema - inference. BigQuery's integer type is INT64, and those types may hold values - that are not correctly represented in a 64-bit signed integer. - -* The SQL types DATE, TIME and DATETIME are now supported. They correspond to - the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil` - package. - -_November 17, 2016_ - -Change to BigQuery: values from INTEGER columns will now be returned as int64, -not int. This will avoid errors arising from large values on 32-bit systems. - -_November 8, 2016_ - -New datastore feature: datastore now encodes your nested Go structs as Entity values, -instead of a flattened list of the embedded struct's fields. -This means that you may now have twice-nested slices, eg. -```go -type State struct { - Cities []struct{ - Populations []int - } -} -``` - -See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for -more details. - -_November 8, 2016_ - -Breaking changes to datastore: contexts no longer hold namespaces; instead you -must set a key's namespace explicitly. Also, key functions have been changed -and renamed. - -* The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method: - ```go - q := datastore.NewQuery("Kind").Namespace("ns") - ``` - -* All the fields of Key are exported. That means you can construct any Key with a struct literal: - ```go - k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} - ``` - -* As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed. - -* `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace - ```go - NewIncompleteKey(ctx, kind, parent) - ``` - with - ```go - IncompleteKey(kind, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. - -* `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace - ```go - NewKey(ctx, kind, name, 0, parent) - NewKey(ctx, kind, "", id, parent) - ``` - with - ```go - NameKey(kind, name, parent) - IDKey(kind, id, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. - -* The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`. - -* The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection. - -See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for -more details. - -_October 27, 2016_ - -Breaking change to bigquery: `NewGCSReference` is now a function, -not a method on `Client`. - -New bigquery feature: `Table.LoaderFrom` now accepts a `ReaderSource`, enabling -loading data into a table from a file or any `io.Reader`. - -_October 21, 2016_ - -Breaking change to pubsub: removed `pubsub.Done`. - -Use `iterator.Done` instead, where `iterator` is the package -`google.golang.org/api/iterator`. - -_October 19, 2016_ - -Breaking changes to cloud.google.com/go/bigquery: - -* Client.Table and Client.OpenTable have been removed. - Replace - ```go - client.OpenTable("project", "dataset", "table") - ``` - with - ```go - client.DatasetInProject("project", "dataset").Table("table") - ``` - -* Client.CreateTable has been removed. - Replace - ```go - client.CreateTable(ctx, "project", "dataset", "table") - ``` - with - ```go - client.DatasetInProject("project", "dataset").Table("table").Create(ctx) - ``` - -* Dataset.ListTables have been replaced with Dataset.Tables. - Replace - ```go - tables, err := ds.ListTables(ctx) - ``` - with - ```go - it := ds.Tables(ctx) - for { - table, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: use table. - } - ``` - -* Client.Read has been replaced with Job.Read, Table.Read and Query.Read. - Replace - ```go - it, err := client.Read(ctx, job) - ``` - with - ```go - it, err := job.Read(ctx) - ``` - and similarly for reading from tables or queries. - -* The iterator returned from the Read methods is now named RowIterator. Its - behavior is closer to the other iterators in these libraries. It no longer - supports the Schema method; see the next item. - Replace - ```go - for it.Next(ctx) { - var vals ValueList - if err := it.Get(&vals); err != nil { - // TODO: Handle error. - } - // TODO: use vals. - } - if err := it.Err(); err != nil { - // TODO: Handle error. - } - ``` - with - ``` - for { - var vals ValueList - err := it.Next(&vals) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: use vals. - } - ``` - Instead of the `RecordsPerRequest(n)` option, write - ```go - it.PageInfo().MaxSize = n - ``` - Instead of the `StartIndex(i)` option, write - ```go - it.StartIndex = i - ``` - -* ValueLoader.Load now takes a Schema in addition to a slice of Values. - Replace - ```go - func (vl *myValueLoader) Load(v []bigquery.Value) - ``` - with - ```go - func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema) - ``` - - -* Table.Patch is replace by Table.Update. - Replace - ```go - p := table.Patch() - p.Description("new description") - metadata, err := p.Apply(ctx) - ``` - with - ```go - metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{ - Description: "new description", - }) - ``` - -* Client.Copy is replaced by separate methods for each of its four functions. - All options have been replaced by struct fields. - - * To load data from Google Cloud Storage into a table, use Table.LoaderFrom. - - Replace - ```go - client.Copy(ctx, table, gcsRef) - ``` - with - ```go - table.LoaderFrom(gcsRef).Run(ctx) - ``` - Instead of passing options to Copy, set fields on the Loader: - ```go - loader := table.LoaderFrom(gcsRef) - loader.WriteDisposition = bigquery.WriteTruncate - ``` - - * To extract data from a table into Google Cloud Storage, use - Table.ExtractorTo. Set fields on the returned Extractor instead of - passing options. - - Replace - ```go - client.Copy(ctx, gcsRef, table) - ``` - with - ```go - table.ExtractorTo(gcsRef).Run(ctx) - ``` - - * To copy data into a table from one or more other tables, use - Table.CopierFrom. Set fields on the returned Copier instead of passing options. - - Replace - ```go - client.Copy(ctx, dstTable, srcTable) - ``` - with - ```go - dst.Table.CopierFrom(srcTable).Run(ctx) - ``` - - * To start a query job, create a Query and call its Run method. Set fields - on the query instead of passing options. - - Replace - ```go - client.Copy(ctx, table, query) - ``` - with - ```go - query.Run(ctx) - ``` - -* Table.NewUploader has been renamed to Table.Uploader. Instead of options, - configure an Uploader by setting its fields. - Replace - ```go - u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) - ``` - with - ```go - u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) - u.IgnoreUnknownValues = true - ``` - -_October 10, 2016_ - -Breaking changes to cloud.google.com/go/storage: - -* AdminClient replaced by methods on Client. - Replace - ```go - adminClient.CreateBucket(ctx, bucketName, attrs) - ``` - with - ```go - client.Bucket(bucketName).Create(ctx, projectID, attrs) - ``` - -* BucketHandle.List replaced by BucketHandle.Objects. - Replace - ```go - for query != nil { - objs, err := bucket.List(d.ctx, query) - if err != nil { ... } - query = objs.Next - for _, obj := range objs.Results { - fmt.Println(obj) - } - } - ``` - with - ```go - iter := bucket.Objects(d.ctx, query) - for { - obj, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { ... } - fmt.Println(obj) - } - ``` - (The `iterator` package is at `google.golang.org/api/iterator`.) - - Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`. - - Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`. - - -* ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. - Replace - ```go - attrs, err := src.CopyTo(ctx, dst, nil) - ``` - with - ```go - attrs, err := dst.CopierFrom(src).Run(ctx) - ``` - - Replace - ```go - attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"}) - ``` - with - ```go - c := dst.CopierFrom(src) - c.ContextType = "text/html" - attrs, err := c.Run(ctx) - ``` - -* ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. - Replace - ```go - attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil) - ``` - with - ```go - attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) - ``` - -* ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. - Replace - ```go - attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"}) - ``` - with - ```go - attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) - ``` - -* ObjectHandle.WithConditions replaced by ObjectHandle.If. - Replace - ```go - obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen)) - ``` - with - ```go - obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen}) - ``` - - Replace - ```go - obj.WithConditions(storage.IfGenerationMatch(0)) - ``` - with - ```go - obj.If(storage.Conditions{DoesNotExist: true}) - ``` - -* `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`). - -_October 6, 2016_ - -Package preview/logging deleted. Use logging instead. - -_September 27, 2016_ - -Logging client replaced with preview version (see below). - -_September 8, 2016_ - -* New clients for some of Google's Machine Learning APIs: Vision, Speech, and -Natural Language. - -* Preview version of a new [Stackdriver Logging][cloud-logging] client in -[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging). -This client uses gRPC as its transport layer, and supports log reading, sinks -and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly. - diff --git a/vendor/cloud.google.com/go/regen-gapic.sh b/vendor/cloud.google.com/go/regen-gapic.sh deleted file mode 100755 index 252c9be0d9..0000000000 --- a/vendor/cloud.google.com/go/regen-gapic.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -# This script generates all GAPIC clients in this repo. -# One-time setup: -# cd path/to/googleapis # https://github.com/googleapis/googleapis -# virtualenv env -# . env/bin/activate -# pip install googleapis-artman -# deactivate -# -# Regenerate: -# cd path/to/googleapis -# . env/bin/activate -# $GOPATH/src/cloud.google.com/go/regen-gapic.sh -# deactivate -# -# Being in googleapis directory is important; -# that's where we find YAML files and where artman puts the "artman-genfiles" directory. -# -# NOTE: This script does not generate the "raw" gRPC client found in google.golang.org/genproto. -# To do that, use the regen.sh script in the genproto repo instead. - -set -ex - -APIS=( -google/api/expr/artman_cel.yaml -google/iam/artman_iam_admin.yaml -google/cloud/asset/artman_cloudasset_v1beta1.yaml -google/iam/credentials/artman_iamcredentials_v1.yaml -google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml -google/cloud/dataproc/artman_dataproc_v1.yaml -google/cloud/dataproc/artman_dataproc_v1beta2.yaml -google/cloud/dialogflow/artman_dialogflow_v2.yaml -google/cloud/kms/artman_cloudkms.yaml -google/cloud/language/artman_language_v1.yaml -google/cloud/language/artman_language_v1beta2.yaml -google/cloud/oslogin/artman_oslogin_v1.yaml -google/cloud/oslogin/artman_oslogin_v1beta.yaml -google/cloud/redis/artman_redis_v1beta1.yaml -google/cloud/redis/artman_redis_v1.yaml -google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml -google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml -google/cloud/speech/artman_speech_v1.yaml -google/cloud/speech/artman_speech_v1p1beta1.yaml -google/cloud/tasks/artman_cloudtasks_v2beta2.yaml -google/cloud/tasks/artman_cloudtasks_v2beta3.yaml -google/cloud/texttospeech/artman_texttospeech_v1.yaml -google/cloud/videointelligence/artman_videointelligence_v1.yaml -google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml -google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml -google/cloud/vision/artman_vision_v1.yaml -google/cloud/vision/artman_vision_v1p1beta1.yaml -google/devtools/artman_clouddebugger.yaml -google/devtools/clouderrorreporting/artman_errorreporting.yaml -google/devtools/cloudtrace/artman_cloudtrace_v1.yaml -google/devtools/cloudtrace/artman_cloudtrace_v2.yaml -google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml -google/firestore/artman_firestore.yaml -google/logging/artman_logging.yaml -google/longrunning/artman_longrunning.yaml -google/monitoring/artman_monitoring.yaml -google/privacy/dlp/artman_dlp_v2.yaml -google/pubsub/artman_pubsub.yaml -google/spanner/admin/database/artman_spanner_admin_database.yaml -google/spanner/admin/instance/artman_spanner_admin_instance.yaml -google/spanner/artman_spanner.yaml -) - -for api in "${APIS[@]}"; do - rm -rf artman-genfiles/* - artman --config "$api" generate go_gapic - cp -r artman-genfiles/gapi-*/cloud.google.com/go/* $GOPATH/src/cloud.google.com/go/ -done - -# NOTE(pongad): `sed -i` doesn't work on Macs, because -i option needs an argument. -# `-i ''` doesn't work on GNU, since the empty string is treated as a file name. -# So we just create the backup and delete it after. -ver=$(date +%Y%m%d) -find $GOPATH/src/cloud.google.com/go/ -name '*.go' -exec sed -i.backup -e "s/^const versionClient.*/const versionClient = \"$ver\"/" '{}' + -find $GOPATH/src/cloud.google.com/go/ -name '*.backup' -delete - -#go list cloud.google.com/go/... | grep apiv | xargs go test - -#go test -short cloud.google.com/go/... - -#echo "googleapis version: $(git rev-parse HEAD)" diff --git a/vendor/cloud.google.com/go/run-tests.sh b/vendor/cloud.google.com/go/run-tests.sh deleted file mode 100755 index a643e61c47..0000000000 --- a/vendor/cloud.google.com/go/run-tests.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -# Selectively run tests for this repo, based on what has changed -# in a commit. Runs short tests for the whole repo, and full tests -# for changed directories. - -set -e - -prefix=cloud.google.com/go - -dryrun=false -if [[ $1 == "-n" ]]; then - dryrun=true - shift -fi - -if [[ $1 == "" ]]; then - echo >&2 "usage: $0 [-n] COMMIT" - exit 1 -fi - -# Files or directories that cause all tests to run if modified. -declare -A run_all -run_all=([.travis.yml]=1 [run-tests.sh]=1) - -function run { - if $dryrun; then - echo $* - else - (set -x; $*) - fi -} - - -# Find all the packages that have changed in this commit. -declare -A changed_packages - -for f in $(git diff-tree --no-commit-id --name-only -r $1); do - if [[ ${run_all[$f]} == 1 ]]; then - # This change requires a full test. Do it and exit. - run go test -race -v $prefix/... - exit - fi - # Map, e.g., "spanner/client.go" to "$prefix/spanner". - d=$(dirname $f) - if [[ $d == "." ]]; then - pkg=$prefix - else - pkg=$prefix/$d - fi - changed_packages[$pkg]=1 -done - -echo "changed packages: ${!changed_packages[*]}" - - -# Reports whether its argument, a package name, depends (recursively) -# on a changed package. -function depends_on_changed_package { - # According to go list, a package does not depend on itself, so - # we test that separately. - if [[ ${changed_packages[$1]} == 1 ]]; then - return 0 - fi - for dep in $(go list -f '{{range .Deps}}{{.}} {{end}}' $1); do - if [[ ${changed_packages[$dep]} == 1 ]]; then - return 0 - fi - done - return 1 -} - -# Collect the packages into two separate lists. (It is faster to call "go test" on a -# list of packages than to individually "go test" each one.) - -shorts= -fulls= -for pkg in $(go list $prefix/...); do # for each package in the repo - if depends_on_changed_package $pkg; then # if it depends on a changed package - fulls="$fulls $pkg" # run the full test - else # otherwise - shorts="$shorts $pkg" # run the short test - fi -done -run go test -race -v -short $shorts -if [[ $fulls != "" ]]; then - run go test -race -v $fulls -fi diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/.gitignore b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/.gitignore deleted file mode 100644 index dd01583f2c..0000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -*.swp -*.swo - -bin/ diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/CONTRIBUTING.md b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/CONTRIBUTING.md deleted file mode 100644 index 939e5341e7..0000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/CONTRIBUTING.md +++ /dev/null @@ -1,28 +0,0 @@ -# How to Contribute - -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution; -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code reviews - -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. Consult -[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. - -## Community Guidelines - -This project follows [Google's Open Source Community -Guidelines](https://opensource.google.com/conduct/). diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Gopkg.lock b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Gopkg.lock deleted file mode 100644 index 6edb29785f..0000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Gopkg.lock +++ /dev/null @@ -1,38 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - digest = "1:d3f4da757a2589770c6962aa3dc8edc8285889cdd12402dde001eafe9bb03c64" - name = "google.golang.org/api" - packages = [ - "compute/v0.alpha", - "compute/v0.beta", - "compute/v1", - "gensupport", - "googleapi", - "googleapi/internal/uritemplates", - ] - pruneopts = "UT" - revision = "583d854617af4d2080b5d2a24d72f7fc5a128ab2" - -[[projects]] - digest = "1:e2999bf1bb6eddc2a6aa03fe5e6629120a53088926520ca3b4765f77d7ff7eab" - name = "k8s.io/klog" - packages = ["."] - pruneopts = "UT" - revision = "a5bc97fbc634d635061f3146511332c7e313a55a" - version = "v0.1.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "google.golang.org/api/compute/v0.alpha", - "google.golang.org/api/compute/v0.beta", - "google.golang.org/api/compute/v1", - "google.golang.org/api/googleapi", - "k8s.io/klog", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Gopkg.toml b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Gopkg.toml deleted file mode 100644 index 4ecfa19792..0000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Gopkg.toml +++ /dev/null @@ -1,33 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - -[[constraint]] - branch = "master" - name = "google.golang.org/api" - -[prune] - go-tests = true - unused-packages = true diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Makefile b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Makefile deleted file mode 100644 index 4265e31489..0000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -all: gen build test - -.PHONY: gen -gen: - go run pkg/cloud/gen/main.go > pkg/cloud/gen.go - go run pkg/cloud/gen/main.go -mode test > pkg/cloud/gen_test.go - -.PHONY: build -build: gen - go build ./... - mkdir -p bin - -.PHONY: test -test: - go test ./... - # We cannot use golint currently due to errors in the GCP API naming. - # golint ./... - go vet ./... - -.PHONY: clean -clean: - rm -rf ./bin diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/README.md b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/README.md deleted file mode 100644 index a836c8aff0..0000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# k8s-cloud-provider - -This repository contains support files for implementing the Kubernetes cloud -provider for the Google Cloud Platform. The code in this repository are the -Google Cloud specific portions of the cloud provider logic. - -## Building - -Run `make`. diff --git a/vendor/github.com/armon/circbuf/.gitignore b/vendor/github.com/armon/circbuf/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/github.com/armon/circbuf/LICENSE b/vendor/github.com/armon/circbuf/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/github.com/beorn7/perks/.gitignore b/vendor/github.com/beorn7/perks/.gitignore deleted file mode 100644 index 1bd9209aa1..0000000000 --- a/vendor/github.com/beorn7/perks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.test -*.prof diff --git a/vendor/github.com/beorn7/perks/README.md b/vendor/github.com/beorn7/perks/README.md deleted file mode 100644 index fc05777701..0000000000 --- a/vendor/github.com/beorn7/perks/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Perks for Go (golang.org) - -Perks contains the Go package quantile that computes approximate quantiles over -an unbounded data stream within low memory and CPU bounds. - -For more information and examples, see: -http://godoc.org/github.com/bmizerany/perks - -A very special thank you and shout out to Graham Cormode (Rutgers University), -Flip Korn (AT&T Labs–Research), S. Muthukrishnan (Rutgers University), and -Divesh Srivastava (AT&T Labs–Research) for their research and publication of -[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf) - -Thank you, also: -* Armon Dadgar (@armon) -* Andrew Gerrand (@nf) -* Brad Fitzpatrick (@bradfitz) -* Keith Rarick (@kr) - -FAQ: - -Q: Why not move the quantile package into the project root? -A: I want to add more packages to perks later. - -Copyright (C) 2013 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go index f4cabd6695..d7d14f8eb6 100644 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/vendor/github.com/beorn7/perks/quantile/stream.go @@ -77,15 +77,20 @@ func NewHighBiased(epsilon float64) *Stream { // is guaranteed to be within (Quantile±Epsilon). // // See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties. -func NewTargeted(targets map[float64]float64) *Stream { +func NewTargeted(targetMap map[float64]float64) *Stream { + // Convert map to slice to avoid slow iterations on a map. + // ƒ is called on the hot path, so converting the map to a slice + // beforehand results in significant CPU savings. + targets := targetMapToSlice(targetMap) + ƒ := func(s *stream, r float64) float64 { var m = math.MaxFloat64 var f float64 - for quantile, epsilon := range targets { - if quantile*s.n <= r { - f = (2 * epsilon * r) / quantile + for _, t := range targets { + if t.quantile*s.n <= r { + f = (2 * t.epsilon * r) / t.quantile } else { - f = (2 * epsilon * (s.n - r)) / (1 - quantile) + f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile) } if f < m { m = f @@ -96,6 +101,25 @@ func NewTargeted(targets map[float64]float64) *Stream { return newStream(ƒ) } +type target struct { + quantile float64 + epsilon float64 +} + +func targetMapToSlice(targetMap map[float64]float64) []target { + targets := make([]target, 0, len(targetMap)) + + for quantile, epsilon := range targetMap { + t := target{ + quantile: quantile, + epsilon: epsilon, + } + targets = append(targets, t) + } + + return targets +} + // Stream computes quantiles for a stream of float64s. It is not thread-safe by // design. Take care when using across multiple goroutines. type Stream struct { diff --git a/vendor/github.com/bhendo/go-powershell/LICENSE b/vendor/github.com/bhendo/go-powershell/LICENSE new file mode 100644 index 0000000000..0e06ff19df --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2017, Gorillalabs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +http://www.opensource.org/licenses/MIT diff --git a/vendor/github.com/bhendo/go-powershell/README.md b/vendor/github.com/bhendo/go-powershell/README.md new file mode 100644 index 0000000000..10c3723fbc --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/README.md @@ -0,0 +1,110 @@ +# go-powershell + +This package is inspired by [jPowerShell](https://github.com/profesorfalken/jPowerShell) +and allows one to run and remote-control a PowerShell session. Use this if you +don't have a static script that you want to execute, bur rather run dynamic +commands. + +## Installation + + go get github.com/bhendo/go-powershell + +## Usage + +To start a PowerShell shell, you need a backend. Backends take care of starting +and controlling the actual powershell.exe process. In most cases, you will want +to use the Local backend, which just uses ``os/exec`` to start the process. + +```go +package main + +import ( + "fmt" + + ps "github.com/bhendo/go-powershell" + "github.com/bhendo/go-powershell/backend" +) + +func main() { + // choose a backend + back := &backend.Local{} + + // start a local powershell process + shell, err := ps.New(back) + if err != nil { + panic(err) + } + defer shell.Exit() + + // ... and interact with it + stdout, stderr, err := shell.Execute("Get-WmiObject -Class Win32_Processor") + if err != nil { + panic(err) + } + + fmt.Println(stdout) +} +``` + +## Remote Sessions + +You can use an existing PS shell to use PSSession cmdlets to connect to remote +computers. Instead of manually handling that, you can use the Session middleware, +which takes care of authentication. Note that you can still use the "raw" shell +to execute commands on the computer where the powershell host process is running. + +```go +package main + +import ( + "fmt" + + ps "github.com/bhendo/go-powershell" + "github.com/bhendo/go-powershell/backend" + "github.com/bhendo/go-powershell/middleware" +) + +func main() { + // choose a backend + back := &backend.Local{} + + // start a local powershell process + shell, err := ps.New(back) + if err != nil { + panic(err) + } + + // prepare remote session configuration + config := middleware.NewSessionConfig() + config.ComputerName = "remote-pc-1" + + // create a new shell by wrapping the existing one in the session middleware + session, err := middleware.NewSession(shell, config) + if err != nil { + panic(err) + } + defer session.Exit() // will also close the underlying ps shell! + + // everything run via the session is run on the remote machine + stdout, stderr, err = session.Execute("Get-WmiObject -Class Win32_Processor") + if err != nil { + panic(err) + } + + fmt.Println(stdout) +} +``` + +Note that a single shell instance is not safe for concurrent use, as are remote +sessions. You can have as many remote sessions using the same shell as you like, +but you must execute commands serially. If you need concurrency, you can just +spawn multiple PowerShell processes (i.e. call ``.New()`` multiple times). + +Also, note that all commands that you execute are wrapped in special echo +statements to delimit the stdout/stderr streams. After ``.Execute()``ing a command, +you can therefore not access ``$LastExitCode`` anymore and expect meaningful +results. + +## License + +MIT, see LICENSE file. diff --git a/vendor/github.com/bhendo/go-powershell/backend/local.go b/vendor/github.com/bhendo/go-powershell/backend/local.go new file mode 100644 index 0000000000..429b1fe245 --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/backend/local.go @@ -0,0 +1,38 @@ +// Copyright (c) 2017 Gorillalabs. All rights reserved. + +package backend + +import ( + "io" + "os/exec" + + "github.com/juju/errors" +) + +type Local struct{} + +func (b *Local) StartProcess(cmd string, args ...string) (Waiter, io.Writer, io.Reader, io.Reader, error) { + command := exec.Command(cmd, args...) + + stdin, err := command.StdinPipe() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not get hold of the PowerShell's stdin stream") + } + + stdout, err := command.StdoutPipe() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not get hold of the PowerShell's stdout stream") + } + + stderr, err := command.StderrPipe() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not get hold of the PowerShell's stderr stream") + } + + err = command.Start() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not spawn PowerShell process") + } + + return command, stdin, stdout, stderr, nil +} diff --git a/vendor/github.com/bhendo/go-powershell/backend/ssh.go b/vendor/github.com/bhendo/go-powershell/backend/ssh.go new file mode 100644 index 0000000000..68c918280d --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/backend/ssh.go @@ -0,0 +1,69 @@ +// Copyright (c) 2017 Gorillalabs. All rights reserved. + +package backend + +import ( + "fmt" + "io" + "regexp" + "strings" + + "github.com/juju/errors" +) + +// sshSession exists so we don't create a hard dependency on crypto/ssh. +type sshSession interface { + Waiter + + StdinPipe() (io.WriteCloser, error) + StdoutPipe() (io.Reader, error) + StderrPipe() (io.Reader, error) + Start(string) error +} + +type SSH struct { + Session sshSession +} + +func (b *SSH) StartProcess(cmd string, args ...string) (Waiter, io.Writer, io.Reader, io.Reader, error) { + stdin, err := b.Session.StdinPipe() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not get hold of the SSH session's stdin stream") + } + + stdout, err := b.Session.StdoutPipe() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not get hold of the SSH session's stdout stream") + } + + stderr, err := b.Session.StderrPipe() + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not get hold of the SSH session's stderr stream") + } + + err = b.Session.Start(b.createCmd(cmd, args)) + if err != nil { + return nil, nil, nil, nil, errors.Annotate(err, "Could not spawn process via SSH") + } + + return b.Session, stdin, stdout, stderr, nil +} + +func (b *SSH) createCmd(cmd string, args []string) string { + parts := []string{cmd} + simple := regexp.MustCompile(`^[a-z0-9_/.~+-]+$`) + + for _, arg := range args { + if !simple.MatchString(arg) { + arg = b.quote(arg) + } + + parts = append(parts, arg) + } + + return strings.Join(parts, " ") +} + +func (b *SSH) quote(s string) string { + return fmt.Sprintf(`"%s"`, s) +} diff --git a/vendor/github.com/bhendo/go-powershell/backend/types.go b/vendor/github.com/bhendo/go-powershell/backend/types.go new file mode 100644 index 0000000000..505471c128 --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/backend/types.go @@ -0,0 +1,13 @@ +// Copyright (c) 2017 Gorillalabs. All rights reserved. + +package backend + +import "io" + +type Waiter interface { + Wait() error +} + +type Starter interface { + StartProcess(cmd string, args ...string) (Waiter, io.Writer, io.Reader, io.Reader, error) +} diff --git a/vendor/github.com/bhendo/go-powershell/shell.go b/vendor/github.com/bhendo/go-powershell/shell.go new file mode 100644 index 0000000000..aca8f7a3df --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/shell.go @@ -0,0 +1,120 @@ +// Copyright (c) 2017 Gorillalabs. All rights reserved. + +package powershell + +import ( + "fmt" + "io" + "strings" + "sync" + + "github.com/bhendo/go-powershell/backend" + "github.com/bhendo/go-powershell/utils" + "github.com/juju/errors" +) + +const newline = "\r\n" + +type Shell interface { + Execute(cmd string) (string, string, error) + Exit() +} + +type shell struct { + handle backend.Waiter + stdin io.Writer + stdout io.Reader + stderr io.Reader +} + +func New(backend backend.Starter) (Shell, error) { + handle, stdin, stdout, stderr, err := backend.StartProcess("powershell.exe", "-NoExit", "-Command", "-") + if err != nil { + return nil, err + } + + return &shell{handle, stdin, stdout, stderr}, nil +} + +func (s *shell) Execute(cmd string) (string, string, error) { + if s.handle == nil { + return "", "", errors.Annotate(errors.New(cmd), "Cannot execute commands on closed shells.") + } + + outBoundary := createBoundary() + errBoundary := createBoundary() + + // wrap the command in special markers so we know when to stop reading from the pipes + full := fmt.Sprintf("%s; echo '%s'; [Console]::Error.WriteLine('%s')%s", cmd, outBoundary, errBoundary, newline) + + _, err := s.stdin.Write([]byte(full)) + if err != nil { + return "", "", errors.Annotate(errors.Annotate(err, cmd), "Could not send PowerShell command") + } + + // read stdout and stderr + sout := "" + serr := "" + + waiter := &sync.WaitGroup{} + waiter.Add(2) + + go streamReader(s.stdout, outBoundary, &sout, waiter) + go streamReader(s.stderr, errBoundary, &serr, waiter) + + waiter.Wait() + + if len(serr) > 0 { + return sout, serr, errors.Annotate(errors.New(cmd), serr) + } + + return sout, serr, nil +} + +func (s *shell) Exit() { + s.stdin.Write([]byte("exit" + newline)) + + // if it's possible to close stdin, do so (some backends, like the local one, + // do support it) + closer, ok := s.stdin.(io.Closer) + if ok { + closer.Close() + } + + s.handle.Wait() + + s.handle = nil + s.stdin = nil + s.stdout = nil + s.stderr = nil +} + +func streamReader(stream io.Reader, boundary string, buffer *string, signal *sync.WaitGroup) error { + // read all output until we have found our boundary token + output := "" + bufsize := 64 + marker := boundary + newline + + for { + buf := make([]byte, bufsize) + read, err := stream.Read(buf) + if err != nil { + return err + } + + output = output + string(buf[:read]) + + if strings.HasSuffix(output, marker) { + break + } + } + + *buffer = strings.TrimSuffix(output, marker) + signal.Done() + + return nil +} + +func createBoundary() string { + return "$gorilla" + utils.CreateRandomString(12) + "$" +} diff --git a/vendor/github.com/bhendo/go-powershell/utils/quote.go b/vendor/github.com/bhendo/go-powershell/utils/quote.go new file mode 100644 index 0000000000..84dd1d38c1 --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/utils/quote.go @@ -0,0 +1,9 @@ +// Copyright (c) 2017 Gorillalabs. All rights reserved. + +package utils + +import "strings" + +func QuoteArg(s string) string { + return "'" + strings.Replace(s, "'", "\"", -1) + "'" +} diff --git a/vendor/github.com/bhendo/go-powershell/utils/rand.go b/vendor/github.com/bhendo/go-powershell/utils/rand.go new file mode 100644 index 0000000000..245243e5a3 --- /dev/null +++ b/vendor/github.com/bhendo/go-powershell/utils/rand.go @@ -0,0 +1,20 @@ +// Copyright (c) 2017 Gorillalabs. All rights reserved. + +package utils + +import ( + "crypto/rand" + "encoding/hex" +) + +func CreateRandomString(bytes int) string { + c := bytes + b := make([]byte, c) + + _, err := rand.Read(b) + if err != nil { + panic(err) + } + + return hex.EncodeToString(b) +} diff --git a/vendor/github.com/blang/semver/package.json b/vendor/github.com/blang/semver/package.json new file mode 100644 index 0000000000..568be8d943 --- /dev/null +++ b/vendor/github.com/blang/semver/package.json @@ -0,0 +1,17 @@ +{ + "author": "blang", + "bugs": { + "URL": "https://github.com/blang/semver/issues", + "url": "https://github.com/blang/semver/issues" + }, + "gx": { + "dvcsimport": "github.com/blang/semver" + }, + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "semver", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.4.0" +} + diff --git a/vendor/github.com/blang/semver/range.go b/vendor/github.com/blang/semver/range.go index 0a8eaa1c9b..fca406d479 100644 --- a/vendor/github.com/blang/semver/range.go +++ b/vendor/github.com/blang/semver/range.go @@ -2,10 +2,33 @@ package semver import ( "fmt" + "strconv" "strings" "unicode" ) +type wildcardType int + +const ( + noneWildcard wildcardType = iota + majorWildcard wildcardType = 1 + minorWildcard wildcardType = 2 + patchWildcard wildcardType = 3 +) + +func wildcardTypefromInt(i int) wildcardType { + switch i { + case 1: + return majorWildcard + case 2: + return minorWildcard + case 3: + return patchWildcard + default: + return noneWildcard + } +} + type comparator func(Version, Version) bool var ( @@ -92,8 +115,12 @@ func ParseRange(s string) (Range, error) { if err != nil { return nil, err } + expandedParts, err := expandWildcardVersion(orParts) + if err != nil { + return nil, err + } var orFn Range - for _, p := range orParts { + for _, p := range expandedParts { var andFn Range for _, ap := range p { opStr, vStr, err := splitComparatorVersion(ap) @@ -164,20 +191,39 @@ func buildVersionRange(opStr, vStr string) (*versionRange, error) { } -// splitAndTrim splits a range string by spaces and cleans leading and trailing spaces +// inArray checks if a byte is contained in an array of bytes +func inArray(s byte, list []byte) bool { + for _, el := range list { + if el == s { + return true + } + } + return false +} + +// splitAndTrim splits a range string by spaces and cleans whitespaces func splitAndTrim(s string) (result []string) { last := 0 + var lastChar byte + excludeFromSplit := []byte{'>', '<', '='} for i := 0; i < len(s); i++ { - if s[i] == ' ' { + if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) { if last < i-1 { result = append(result, s[last:i]) } last = i + 1 + } else if s[i] != ' ' { + lastChar = s[i] } } if last < len(s)-1 { result = append(result, s[last:]) } + + for i, v := range result { + result[i] = strings.Replace(v, " ", "", -1) + } + // parts := strings.Split(s, " ") // for _, x := range parts { // if s := strings.TrimSpace(x); len(s) != 0 { @@ -188,7 +234,6 @@ func splitAndTrim(s string) (result []string) { } // splitComparatorVersion splits the comparator from the version. -// Spaces between the comparator and the version are not allowed. // Input must be free of leading or trailing spaces. func splitComparatorVersion(s string) (string, string, error) { i := strings.IndexFunc(s, unicode.IsDigit) @@ -198,6 +243,144 @@ func splitComparatorVersion(s string) (string, string, error) { return strings.TrimSpace(s[0:i]), s[i:], nil } +// getWildcardType will return the type of wildcard that the +// passed version contains +func getWildcardType(vStr string) wildcardType { + parts := strings.Split(vStr, ".") + nparts := len(parts) + wildcard := parts[nparts-1] + + possibleWildcardType := wildcardTypefromInt(nparts) + if wildcard == "x" { + return possibleWildcardType + } + + return noneWildcard +} + +// createVersionFromWildcard will convert a wildcard version +// into a regular version, replacing 'x's with '0's, handling +// special cases like '1.x.x' and '1.x' +func createVersionFromWildcard(vStr string) string { + // handle 1.x.x + vStr2 := strings.Replace(vStr, ".x.x", ".x", 1) + vStr2 = strings.Replace(vStr2, ".x", ".0", 1) + parts := strings.Split(vStr2, ".") + + // handle 1.x + if len(parts) == 2 { + return vStr2 + ".0" + } + + return vStr2 +} + +// incrementMajorVersion will increment the major version +// of the passed version +func incrementMajorVersion(vStr string) (string, error) { + parts := strings.Split(vStr, ".") + i, err := strconv.Atoi(parts[0]) + if err != nil { + return "", err + } + parts[0] = strconv.Itoa(i + 1) + + return strings.Join(parts, "."), nil +} + +// incrementMajorVersion will increment the minor version +// of the passed version +func incrementMinorVersion(vStr string) (string, error) { + parts := strings.Split(vStr, ".") + i, err := strconv.Atoi(parts[1]) + if err != nil { + return "", err + } + parts[1] = strconv.Itoa(i + 1) + + return strings.Join(parts, "."), nil +} + +// expandWildcardVersion will expand wildcards inside versions +// following these rules: +// +// * when dealing with patch wildcards: +// >= 1.2.x will become >= 1.2.0 +// <= 1.2.x will become < 1.3.0 +// > 1.2.x will become >= 1.3.0 +// < 1.2.x will become < 1.2.0 +// != 1.2.x will become < 1.2.0 >= 1.3.0 +// +// * when dealing with minor wildcards: +// >= 1.x will become >= 1.0.0 +// <= 1.x will become < 2.0.0 +// > 1.x will become >= 2.0.0 +// < 1.0 will become < 1.0.0 +// != 1.x will become < 1.0.0 >= 2.0.0 +// +// * when dealing with wildcards without +// version operator: +// 1.2.x will become >= 1.2.0 < 1.3.0 +// 1.x will become >= 1.0.0 < 2.0.0 +func expandWildcardVersion(parts [][]string) ([][]string, error) { + var expandedParts [][]string + for _, p := range parts { + var newParts []string + for _, ap := range p { + if strings.Index(ap, "x") != -1 { + opStr, vStr, err := splitComparatorVersion(ap) + if err != nil { + return nil, err + } + + versionWildcardType := getWildcardType(vStr) + flatVersion := createVersionFromWildcard(vStr) + + var resultOperator string + var shouldIncrementVersion bool + switch opStr { + case ">": + resultOperator = ">=" + shouldIncrementVersion = true + case ">=": + resultOperator = ">=" + case "<": + resultOperator = "<" + case "<=": + resultOperator = "<" + shouldIncrementVersion = true + case "", "=", "==": + newParts = append(newParts, ">="+flatVersion) + resultOperator = "<" + shouldIncrementVersion = true + case "!=", "!": + newParts = append(newParts, "<"+flatVersion) + resultOperator = ">=" + shouldIncrementVersion = true + } + + var resultVersion string + if shouldIncrementVersion { + switch versionWildcardType { + case patchWildcard: + resultVersion, _ = incrementMinorVersion(flatVersion) + case minorWildcard: + resultVersion, _ = incrementMajorVersion(flatVersion) + } + } else { + resultVersion = flatVersion + } + + ap = resultOperator + resultVersion + } + newParts = append(newParts, ap) + } + expandedParts = append(expandedParts, newParts) + } + + return expandedParts, nil +} + func parseComparator(s string) comparator { switch s { case "==": @@ -222,3 +405,12 @@ func parseComparator(s string) comparator { return nil } + +// MustParseRange is like ParseRange but panics if the range cannot be parsed. +func MustParseRange(s string) Range { + r, err := ParseRange(s) + if err != nil { + panic(`semver: ParseRange(` + s + `): ` + err.Error()) + } + return r +} diff --git a/vendor/github.com/blang/semver/semver.go b/vendor/github.com/blang/semver/semver.go index bbf85ce972..8ee0842e6a 100644 --- a/vendor/github.com/blang/semver/semver.go +++ b/vendor/github.com/blang/semver/semver.go @@ -200,6 +200,29 @@ func Make(s string) (Version, error) { return Parse(s) } +// ParseTolerant allows for certain version specifications that do not strictly adhere to semver +// specs to be parsed by this library. It does so by normalizing versions before passing them to +// Parse(). It currently trims spaces, removes a "v" prefix, and adds a 0 patch number to versions +// with only major and minor components specified +func ParseTolerant(s string) (Version, error) { + s = strings.TrimSpace(s) + s = strings.TrimPrefix(s, "v") + + // Split into major.minor.(patch+pr+meta) + parts := strings.SplitN(s, ".", 3) + if len(parts) < 3 { + if strings.ContainsAny(parts[len(parts)-1], "+-") { + return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") + } + for len(parts) < 3 { + parts = append(parts, "0") + } + s = strings.Join(parts, ".") + } + + return Parse(s) +} + // Parse parses version string and returns a validated Version or error func Parse(s string) (Version, error) { if len(s) == 0 { diff --git a/vendor/github.com/buger/jsonparser/.gitignore b/vendor/github.com/buger/jsonparser/.gitignore new file mode 100644 index 0000000000..9de1b0fa60 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/.gitignore @@ -0,0 +1,10 @@ + +*.test + +*.out + +*.mprof + +vendor/github.com/buger/goterm/ +prof.cpu +prof.mem diff --git a/vendor/github.com/buger/jsonparser/.travis.yml b/vendor/github.com/buger/jsonparser/.travis.yml new file mode 100644 index 0000000000..8e29f1312a --- /dev/null +++ b/vendor/github.com/buger/jsonparser/.travis.yml @@ -0,0 +1,8 @@ +language: go +go: + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + - 1.11.x +script: go test -v ./. diff --git a/vendor/github.com/buger/jsonparser/Dockerfile b/vendor/github.com/buger/jsonparser/Dockerfile new file mode 100644 index 0000000000..37fc9fd0b4 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.6 + +RUN go get github.com/Jeffail/gabs +RUN go get github.com/bitly/go-simplejson +RUN go get github.com/pquerna/ffjson +RUN go get github.com/antonholmquist/jason +RUN go get github.com/mreiferson/go-ujson +RUN go get -tags=unsafe -u github.com/ugorji/go/codec +RUN go get github.com/mailru/easyjson + +WORKDIR /go/src/github.com/buger/jsonparser +ADD . /go/src/github.com/buger/jsonparser \ No newline at end of file diff --git a/vendor/github.com/buger/jsonparser/LICENSE b/vendor/github.com/buger/jsonparser/LICENSE new file mode 100644 index 0000000000..ac25aeb7da --- /dev/null +++ b/vendor/github.com/buger/jsonparser/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Leonid Bugaev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/buger/jsonparser/Makefile b/vendor/github.com/buger/jsonparser/Makefile new file mode 100644 index 0000000000..e843368cf1 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/Makefile @@ -0,0 +1,36 @@ +SOURCE = parser.go +CONTAINER = jsonparser +SOURCE_PATH = /go/src/github.com/buger/jsonparser +BENCHMARK = JsonParser +BENCHTIME = 5s +TEST = . +DRUN = docker run -v `pwd`:$(SOURCE_PATH) -i -t $(CONTAINER) + +build: + docker build -t $(CONTAINER) . + +race: + $(DRUN) --env GORACE="halt_on_error=1" go test ./. $(ARGS) -v -race -timeout 15s + +bench: + $(DRUN) go test $(LDFLAGS) -test.benchmem -bench $(BENCHMARK) ./benchmark/ $(ARGS) -benchtime $(BENCHTIME) -v + +bench_local: + $(DRUN) go test $(LDFLAGS) -test.benchmem -bench . $(ARGS) -benchtime $(BENCHTIME) -v + +profile: + $(DRUN) go test $(LDFLAGS) -test.benchmem -bench $(BENCHMARK) ./benchmark/ $(ARGS) -memprofile mem.mprof -v + $(DRUN) go test $(LDFLAGS) -test.benchmem -bench $(BENCHMARK) ./benchmark/ $(ARGS) -cpuprofile cpu.out -v + $(DRUN) go test $(LDFLAGS) -test.benchmem -bench $(BENCHMARK) ./benchmark/ $(ARGS) -c + +test: + $(DRUN) go test $(LDFLAGS) ./ -run $(TEST) -timeout 10s $(ARGS) -v + +fmt: + $(DRUN) go fmt ./... + +vet: + $(DRUN) go vet ./. + +bash: + $(DRUN) /bin/bash \ No newline at end of file diff --git a/vendor/github.com/buger/jsonparser/README.md b/vendor/github.com/buger/jsonparser/README.md new file mode 100644 index 0000000000..a9ee6022dc --- /dev/null +++ b/vendor/github.com/buger/jsonparser/README.md @@ -0,0 +1,365 @@ +[![Go Report Card](https://goreportcard.com/badge/github.com/buger/jsonparser)](https://goreportcard.com/report/github.com/buger/jsonparser) ![License](https://img.shields.io/dub/l/vibe-d.svg) +# Alternative JSON parser for Go (so far fastest) + +It does not require you to know the structure of the payload (eg. create structs), and allows accessing fields by providing the path to them. It is up to **10 times faster** than standard `encoding/json` package (depending on payload size and usage), **allocates no memory**. See benchmarks below. + +## Rationale +Originally I made this for a project that relies on a lot of 3rd party APIs that can be unpredictable and complex. +I love simplicity and prefer to avoid external dependecies. `encoding/json` requires you to know exactly your data structures, or if you prefer to use `map[string]interface{}` instead, it will be very slow and hard to manage. +I investigated what's on the market and found that most libraries are just wrappers around `encoding/json`, there is few options with own parsers (`ffjson`, `easyjson`), but they still requires you to create data structures. + + +Goal of this project is to push JSON parser to the performance limits and not sacrifice with compliance and developer user experience. + +## Example +For the given JSON our goal is to extract the user's full name, number of github followers and avatar. + +```go +import "github.com/buger/jsonparser" + +... + +data := []byte(`{ + "person": { + "name": { + "first": "Leonid", + "last": "Bugaev", + "fullName": "Leonid Bugaev" + }, + "github": { + "handle": "buger", + "followers": 109 + }, + "avatars": [ + { "url": "https://avatars1.githubusercontent.com/u/14009?v=3&s=460", "type": "thumbnail" } + ] + }, + "company": { + "name": "Acme" + } +}`) + +// You can specify key path by providing arguments to Get function +jsonparser.Get(data, "person", "name", "fullName") + +// There is `GetInt` and `GetBoolean` helpers if you exactly know key data type +jsonparser.GetInt(data, "person", "github", "followers") + +// When you try to get object, it will return you []byte slice pointer to data containing it +// In `company` it will be `{"name": "Acme"}` +jsonparser.Get(data, "company") + +// If the key doesn't exist it will throw an error +var size int64 +if value, err := jsonparser.GetInt(data, "company", "size"); err == nil { + size = value +} + +// You can use `ArrayEach` helper to iterate items [item1, item2 .... itemN] +jsonparser.ArrayEach(data, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { + fmt.Println(jsonparser.Get(value, "url")) +}, "person", "avatars") + +// Or use can access fields by index! +jsonparser.GetInt("person", "avatars", "[0]", "url") + +// You can use `ObjectEach` helper to iterate objects { "key1":object1, "key2":object2, .... "keyN":objectN } +jsonparser.ObjectEach(data, func(key []byte, value []byte, dataType jsonparser.ValueType, offset int) error { + fmt.Printf("Key: '%s'\n Value: '%s'\n Type: %s\n", string(key), string(value), dataType) + return nil +}, "person", "name") + +// The most efficient way to extract multiple keys is `EachKey` + +paths := [][]string{ + []string{"person", "name", "fullName"}, + []string{"person", "avatars", "[0]", "url"}, + []string{"company", "url"}, +} +jsonparser.EachKey(data, func(idx int, value []byte, vt jsonparser.ValueType, err error){ + switch idx { + case 0: // []string{"person", "name", "fullName"} + ... + case 1: // []string{"person", "avatars", "[0]", "url"} + ... + case 2: // []string{"company", "url"}, + ... + } +}, paths...) + +// For more information see docs below +``` + +## Need to speedup your app? + +I'm available for consulting and can help you push your app performance to the limits. Ping me at: leonsbox@gmail.com. + +## Reference + +Library API is really simple. You just need the `Get` method to perform any operation. The rest is just helpers around it. + +You also can view API at [godoc.org](https://godoc.org/github.com/buger/jsonparser) + + +### **`Get`** +```go +func Get(data []byte, keys ...string) (value []byte, dataType jsonparser.ValueType, offset int, err error) +``` +Receives data structure, and key path to extract value from. + +Returns: +* `value` - Pointer to original data structure containing key value, or just empty slice if nothing found or error +* `dataType` - Can be: `NotExist`, `String`, `Number`, `Object`, `Array`, `Boolean` or `Null` +* `offset` - Offset from provided data structure where key value ends. Used mostly internally, for example for `ArrayEach` helper. +* `err` - If the key is not found or any other parsing issue, it should return error. If key not found it also sets `dataType` to `NotExist` + +Accepts multiple keys to specify path to JSON value (in case of quering nested structures). +If no keys are provided it will try to extract the closest JSON value (simple ones or object/array), useful for reading streams or arrays, see `ArrayEach` implementation. + +Note that keys can be an array indexes: `jsonparser.GetInt("person", "avatars", "[0]", "url")`, pretty cool, yeah? + +### **`GetString`** +```go +func GetString(data []byte, keys ...string) (val string, err error) +``` +Returns strings properly handing escaped and unicode characters. Note that this will cause additional memory allocations. + +### **`GetUnsafeString`** +If you need string in your app, and ready to sacrifice with support of escaped symbols in favor of speed. It returns string mapped to existing byte slice memory, without any allocations: +```go +s, _, := jsonparser.GetUnsafeString(data, "person", "name", "title") +switch s { + case 'CEO': + ... + case 'Engineer' + ... + ... +} +``` +Note that `unsafe` here means that your string will exist until GC will free underlying byte slice, for most of cases it means that you can use this string only in current context, and should not pass it anywhere externally: through channels or any other way. + + +### **`GetBoolean`**, **`GetInt`** and **`GetFloat`** +```go +func GetBoolean(data []byte, keys ...string) (val bool, err error) + +func GetFloat(data []byte, keys ...string) (val float64, err error) + +func GetInt(data []byte, keys ...string) (val int64, err error) +``` +If you know the key type, you can use the helpers above. +If key data type do not match, it will return error. + +### **`ArrayEach`** +```go +func ArrayEach(data []byte, cb func(value []byte, dataType jsonparser.ValueType, offset int, err error), keys ...string) +``` +Needed for iterating arrays, accepts a callback function with the same return arguments as `Get`. + +### **`ObjectEach`** +```go +func ObjectEach(data []byte, callback func(key []byte, value []byte, dataType ValueType, offset int) error, keys ...string) (err error) +``` +Needed for iterating object, accepts a callback function. Example: +```go +var handler func([]byte, []byte, jsonparser.ValueType, int) error +handler = func(key []byte, value []byte, dataType jsonparser.ValueType, offset int) error { + //do stuff here +} +jsonparser.ObjectEach(myJson, handler) +``` + + +### **`EachKey`** +```go +func EachKey(data []byte, cb func(idx int, value []byte, dataType jsonparser.ValueType, err error), paths ...[]string) +``` +When you need to read multiple keys, and you do not afraid of low-level API `EachKey` is your friend. It read payload only single time, and calls callback function once path is found. For example when you call multiple times `Get`, it has to process payload multiple times, each time you call it. Depending on payload `EachKey` can be multiple times faster than `Get`. Path can use nested keys as well! + +```go +paths := [][]string{ + []string{"uuid"}, + []string{"tz"}, + []string{"ua"}, + []string{"st"}, +} +var data SmallPayload + +jsonparser.EachKey(smallFixture, func(idx int, value []byte, vt jsonparser.ValueType, err error){ + switch idx { + case 0: + data.Uuid, _ = value + case 1: + v, _ := jsonparser.ParseInt(value) + data.Tz = int(v) + case 2: + data.Ua, _ = value + case 3: + v, _ := jsonparser.ParseInt(value) + data.St = int(v) + } +}, paths...) +``` + +### **`Set`** +```go +func Set(data []byte, setValue []byte, keys ...string) (value []byte, err error) +``` +Receives existing data structure, key path to set, and value to set at that key. *This functionality is experimental.* + +Returns: +* `value` - Pointer to original data structure with updated or added key value. +* `err` - If any parsing issue, it should return error. + +Accepts multiple keys to specify path to JSON value (in case of updating or creating nested structures). + +Note that keys can be an array indexes: `jsonparser.Set(data, []byte("http://github.com"), "person", "avatars", "[0]", "url")` + +### **`Delete`** +```go +func Delete(data []byte, keys ...string) value []byte +``` +Receives existing data structure, and key path to delete. *This functionality is experimental.* + +Returns: +* `value` - Pointer to original data structure with key path deleted if it can be found. If there is no key path, then the whole data structure is deleted. + +Accepts multiple keys to specify path to JSON value (in case of updating or creating nested structures). + +Note that keys can be an array indexes: `jsonparser.Delete(data, "person", "avatars", "[0]", "url")` + + +## What makes it so fast? +* It does not rely on `encoding/json`, `reflection` or `interface{}`, the only real package dependency is `bytes`. +* Operates with JSON payload on byte level, providing you pointers to the original data structure: no memory allocation. +* No automatic type conversions, by default everything is a []byte, but it provides you value type, so you can convert by yourself (there is few helpers included). +* Does not parse full record, only keys you specified + + +## Benchmarks + +There are 3 benchmark types, trying to simulate real-life usage for small, medium and large JSON payloads. +For each metric, the lower value is better. Time/op is in nanoseconds. Values better than standard encoding/json marked as bold text. +Benchmarks run on standard Linode 1024 box. + +Compared libraries: +* https://golang.org/pkg/encoding/json +* https://github.com/Jeffail/gabs +* https://github.com/a8m/djson +* https://github.com/bitly/go-simplejson +* https://github.com/antonholmquist/jason +* https://github.com/mreiferson/go-ujson +* https://github.com/ugorji/go/codec +* https://github.com/pquerna/ffjson +* https://github.com/mailru/easyjson +* https://github.com/buger/jsonparser + +#### TLDR +If you want to skip next sections we have 2 winner: `jsonparser` and `easyjson`. +`jsonparser` is up to 10 times faster than standard `encoding/json` package (depending on payload size and usage), and almost infinitely (literally) better in memory consumption because it operates with data on byte level, and provide direct slice pointers. +`easyjson` wins in CPU in medium tests and frankly i'm impressed with this package: it is remarkable results considering that it is almost drop-in replacement for `encoding/json` (require some code generation). + +It's hard to fully compare `jsonparser` and `easyjson` (or `ffson`), they a true parsers and fully process record, unlike `jsonparser` which parse only keys you specified. + +If you searching for replacement of `encoding/json` while keeping structs, `easyjson` is an amazing choice. If you want to process dynamic JSON, have memory constrains, or more control over your data you should try `jsonparser`. + +`jsonparser` performance heavily depends on usage, and it works best when you do not need to process full record, only some keys. The more calls you need to make, the slower it will be, in contrast `easyjson` (or `ffjson`, `encoding/json`) parser record only 1 time, and then you can make as many calls as you want. + +With great power comes great responsibility! :) + + +#### Small payload + +Each test processes 190 bytes of http log as a JSON record. +It should read multiple fields. +https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_small_payload_test.go + +Library | time/op | bytes/op | allocs/op + ------ | ------- | -------- | ------- +encoding/json struct | 7879 | 880 | 18 +encoding/json interface{} | 8946 | 1521 | 38 +Jeffail/gabs | 10053 | 1649 | 46 +bitly/go-simplejson | 10128 | 2241 | 36 +antonholmquist/jason | 27152 | 7237 | 101 +github.com/ugorji/go/codec | 8806 | 2176 | 31 +mreiferson/go-ujson | **7008** | **1409** | 37 +a8m/djson | 3862 | 1249 | 30 +pquerna/ffjson | **3769** | **624** | **15** +mailru/easyjson | **2002** | **192** | **9** +buger/jsonparser | **1367** | **0** | **0** +buger/jsonparser (EachKey API) | **809** | **0** | **0** + +Winners are ffjson, easyjson and jsonparser, where jsonparser is up to 9.8x faster than encoding/json and 4.6x faster than ffjson, and slightly faster than easyjson. +If you look at memory allocation, jsonparser has no rivals, as it makes no data copy and operates with raw []byte structures and pointers to it. + +#### Medium payload + +Each test processes a 2.4kb JSON record (based on Clearbit API). +It should read multiple nested fields and 1 array. + +https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_medium_payload_test.go + +| Library | time/op | bytes/op | allocs/op | +| ------- | ------- | -------- | --------- | +| encoding/json struct | 57749 | 1336 | 29 | +| encoding/json interface{} | 79297 | 10627 | 215 | +| Jeffail/gabs | 83807 | 11202 | 235 | +| bitly/go-simplejson | 88187 | 17187 | 220 | +| antonholmquist/jason | 94099 | 19013 | 247 | +| github.com/ugorji/go/codec | 114719 | 6712 | 152 | +| mreiferson/go-ujson | **56972** | 11547 | 270 | +| a8m/djson | 28525 | 10196 | 198 | +| pquerna/ffjson | **20298** | **856** | **20** | +| mailru/easyjson | **10512** | **336** | **12** | +| buger/jsonparser | **15955** | **0** | **0** | +| buger/jsonparser (EachKey API) | **8916** | **0** | **0** | + +The difference between ffjson and jsonparser in CPU usage is smaller, while the memory consumption difference is growing. On the other hand `easyjson` shows remarkable performance for medium payload. + +`gabs`, `go-simplejson` and `jason` are based on encoding/json and map[string]interface{} and actually only helpers for unstructured JSON, their performance correlate with `encoding/json interface{}`, and they will skip next round. +`go-ujson` while have its own parser, shows same performance as `encoding/json`, also skips next round. Same situation with `ugorji/go/codec`, but it showed unexpectedly bad performance for complex payloads. + + +#### Large payload + +Each test processes a 24kb JSON record (based on Discourse API) +It should read 2 arrays, and for each item in array get a few fields. +Basically it means processing a full JSON file. + +https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_large_payload_test.go + +| Library | time/op | bytes/op | allocs/op | +| --- | --- | --- | --- | +| encoding/json struct | 748336 | 8272 | 307 | +| encoding/json interface{} | 1224271 | 215425 | 3395 | +| a8m/djson | 510082 | 213682 | 2845 | +| pquerna/ffjson | **312271** | **7792** | **298** | +| mailru/easyjson | **154186** | **6992** | **288** | +| buger/jsonparser | **85308** | **0** | **0** | + +`jsonparser` now is a winner, but do not forget that it is way more lightweight parser than `ffson` or `easyjson`, and they have to parser all the data, while `jsonparser` parse only what you need. All `ffjson`, `easysjon` and `jsonparser` have their own parsing code, and does not depend on `encoding/json` or `interface{}`, thats one of the reasons why they are so fast. `easyjson` also use a bit of `unsafe` package to reduce memory consuption (in theory it can lead to some unexpected GC issue, but i did not tested enough) + +Also last benchmark did not included `EachKey` test, because in this particular case we need to read lot of Array values, and using `ArrayEach` is more efficient. + +## Questions and support + +All bug-reports and suggestions should go though Github Issues. + +## Contributing + +1. Fork it +2. Create your feature branch (git checkout -b my-new-feature) +3. Commit your changes (git commit -am 'Added some feature') +4. Push to the branch (git push origin my-new-feature) +5. Create new Pull Request + +## Development + +All my development happens using Docker, and repo include some Make tasks to simplify development. + +* `make build` - builds docker image, usually can be called only once +* `make test` - run tests +* `make fmt` - run go fmt +* `make bench` - run benchmarks (if you need to run only single benchmark modify `BENCHMARK` variable in make file) +* `make profile` - runs benchmark and generate 3 files- `cpu.out`, `mem.mprof` and `benchmark.test` binary, which can be used for `go tool pprof` +* `make bash` - enter container (i use it for running `go tool pprof` above) diff --git a/vendor/github.com/buger/jsonparser/bytes.go b/vendor/github.com/buger/jsonparser/bytes.go new file mode 100644 index 0000000000..0bb0ff3956 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/bytes.go @@ -0,0 +1,47 @@ +package jsonparser + +import ( + bio "bytes" +) + +// minInt64 '-9223372036854775808' is the smallest representable number in int64 +const minInt64 = `9223372036854775808` + +// About 2x faster then strconv.ParseInt because it only supports base 10, which is enough for JSON +func parseInt(bytes []byte) (v int64, ok bool, overflow bool) { + if len(bytes) == 0 { + return 0, false, false + } + + var neg bool = false + if bytes[0] == '-' { + neg = true + bytes = bytes[1:] + } + + var b int64 = 0 + for _, c := range bytes { + if c >= '0' && c <= '9' { + b = (10 * v) + int64(c-'0') + } else { + return 0, false, false + } + if overflow = (b < v); overflow { + break + } + v = b + } + + if overflow { + if neg && bio.Equal(bytes, []byte(minInt64)) { + return b, true, false + } + return 0, false, true + } + + if neg { + return -v, true, false + } else { + return v, true, false + } +} diff --git a/vendor/github.com/buger/jsonparser/bytes_safe.go b/vendor/github.com/buger/jsonparser/bytes_safe.go new file mode 100644 index 0000000000..ff16a4a195 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/bytes_safe.go @@ -0,0 +1,25 @@ +// +build appengine appenginevm + +package jsonparser + +import ( + "strconv" +) + +// See fastbytes_unsafe.go for explanation on why *[]byte is used (signatures must be consistent with those in that file) + +func equalStr(b *[]byte, s string) bool { + return string(*b) == s +} + +func parseFloat(b *[]byte) (float64, error) { + return strconv.ParseFloat(string(*b), 64) +} + +func bytesToString(b *[]byte) string { + return string(*b) +} + +func StringToBytes(s string) []byte { + return []byte(s) +} diff --git a/vendor/github.com/buger/jsonparser/bytes_unsafe.go b/vendor/github.com/buger/jsonparser/bytes_unsafe.go new file mode 100644 index 0000000000..d3f523ddeb --- /dev/null +++ b/vendor/github.com/buger/jsonparser/bytes_unsafe.go @@ -0,0 +1,42 @@ +// +build !appengine,!appenginevm + +package jsonparser + +import ( + "reflect" + "strconv" + "unsafe" +) + +// +// The reason for using *[]byte rather than []byte in parameters is an optimization. As of Go 1.6, +// the compiler cannot perfectly inline the function when using a non-pointer slice. That is, +// the non-pointer []byte parameter version is slower than if its function body is manually +// inlined, whereas the pointer []byte version is equally fast to the manually inlined +// version. Instruction count in assembly taken from "go tool compile" confirms this difference. +// +// TODO: Remove hack after Go 1.7 release +// +func equalStr(b *[]byte, s string) bool { + return *(*string)(unsafe.Pointer(b)) == s +} + +func parseFloat(b *[]byte) (float64, error) { + return strconv.ParseFloat(*(*string)(unsafe.Pointer(b)), 64) +} + +// A hack until issue golang/go#2632 is fixed. +// See: https://github.com/golang/go/issues/2632 +func bytesToString(b *[]byte) string { + return *(*string)(unsafe.Pointer(b)) +} + +func StringToBytes(s string) []byte { + sh := (*reflect.StringHeader)(unsafe.Pointer(&s)) + bh := reflect.SliceHeader{ + Data: sh.Data, + Len: sh.Len, + Cap: sh.Len, + } + return *(*[]byte)(unsafe.Pointer(&bh)) +} diff --git a/vendor/github.com/buger/jsonparser/escape.go b/vendor/github.com/buger/jsonparser/escape.go new file mode 100644 index 0000000000..49669b9420 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/escape.go @@ -0,0 +1,173 @@ +package jsonparser + +import ( + "bytes" + "unicode/utf8" +) + +// JSON Unicode stuff: see https://tools.ietf.org/html/rfc7159#section-7 + +const supplementalPlanesOffset = 0x10000 +const highSurrogateOffset = 0xD800 +const lowSurrogateOffset = 0xDC00 + +const basicMultilingualPlaneReservedOffset = 0xDFFF +const basicMultilingualPlaneOffset = 0xFFFF + +func combineUTF16Surrogates(high, low rune) rune { + return supplementalPlanesOffset + (high-highSurrogateOffset)<<10 + (low - lowSurrogateOffset) +} + +const badHex = -1 + +func h2I(c byte) int { + switch { + case c >= '0' && c <= '9': + return int(c - '0') + case c >= 'A' && c <= 'F': + return int(c - 'A' + 10) + case c >= 'a' && c <= 'f': + return int(c - 'a' + 10) + } + return badHex +} + +// decodeSingleUnicodeEscape decodes a single \uXXXX escape sequence. The prefix \u is assumed to be present and +// is not checked. +// In JSON, these escapes can either come alone or as part of "UTF16 surrogate pairs" that must be handled together. +// This function only handles one; decodeUnicodeEscape handles this more complex case. +func decodeSingleUnicodeEscape(in []byte) (rune, bool) { + // We need at least 6 characters total + if len(in) < 6 { + return utf8.RuneError, false + } + + // Convert hex to decimal + h1, h2, h3, h4 := h2I(in[2]), h2I(in[3]), h2I(in[4]), h2I(in[5]) + if h1 == badHex || h2 == badHex || h3 == badHex || h4 == badHex { + return utf8.RuneError, false + } + + // Compose the hex digits + return rune(h1<<12 + h2<<8 + h3<<4 + h4), true +} + +// isUTF16EncodedRune checks if a rune is in the range for non-BMP characters, +// which is used to describe UTF16 chars. +// Source: https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane +func isUTF16EncodedRune(r rune) bool { + return highSurrogateOffset <= r && r <= basicMultilingualPlaneReservedOffset +} + +func decodeUnicodeEscape(in []byte) (rune, int) { + if r, ok := decodeSingleUnicodeEscape(in); !ok { + // Invalid Unicode escape + return utf8.RuneError, -1 + } else if r <= basicMultilingualPlaneOffset && !isUTF16EncodedRune(r) { + // Valid Unicode escape in Basic Multilingual Plane + return r, 6 + } else if r2, ok := decodeSingleUnicodeEscape(in[6:]); !ok { // Note: previous decodeSingleUnicodeEscape success guarantees at least 6 bytes remain + // UTF16 "high surrogate" without manditory valid following Unicode escape for the "low surrogate" + return utf8.RuneError, -1 + } else if r2 < lowSurrogateOffset { + // Invalid UTF16 "low surrogate" + return utf8.RuneError, -1 + } else { + // Valid UTF16 surrogate pair + return combineUTF16Surrogates(r, r2), 12 + } +} + +// backslashCharEscapeTable: when '\X' is found for some byte X, it is to be replaced with backslashCharEscapeTable[X] +var backslashCharEscapeTable = [...]byte{ + '"': '"', + '\\': '\\', + '/': '/', + 'b': '\b', + 'f': '\f', + 'n': '\n', + 'r': '\r', + 't': '\t', +} + +// unescapeToUTF8 unescapes the single escape sequence starting at 'in' into 'out' and returns +// how many characters were consumed from 'in' and emitted into 'out'. +// If a valid escape sequence does not appear as a prefix of 'in', (-1, -1) to signal the error. +func unescapeToUTF8(in, out []byte) (inLen int, outLen int) { + if len(in) < 2 || in[0] != '\\' { + // Invalid escape due to insufficient characters for any escape or no initial backslash + return -1, -1 + } + + // https://tools.ietf.org/html/rfc7159#section-7 + switch e := in[1]; e { + case '"', '\\', '/', 'b', 'f', 'n', 'r', 't': + // Valid basic 2-character escapes (use lookup table) + out[0] = backslashCharEscapeTable[e] + return 2, 1 + case 'u': + // Unicode escape + if r, inLen := decodeUnicodeEscape(in); inLen == -1 { + // Invalid Unicode escape + return -1, -1 + } else { + // Valid Unicode escape; re-encode as UTF8 + outLen := utf8.EncodeRune(out, r) + return inLen, outLen + } + } + + return -1, -1 +} + +// unescape unescapes the string contained in 'in' and returns it as a slice. +// If 'in' contains no escaped characters: +// Returns 'in'. +// Else, if 'out' is of sufficient capacity (guaranteed if cap(out) >= len(in)): +// 'out' is used to build the unescaped string and is returned with no extra allocation +// Else: +// A new slice is allocated and returned. +func Unescape(in, out []byte) ([]byte, error) { + firstBackslash := bytes.IndexByte(in, '\\') + if firstBackslash == -1 { + return in, nil + } + + // Get a buffer of sufficient size (allocate if needed) + if cap(out) < len(in) { + out = make([]byte, len(in)) + } else { + out = out[0:len(in)] + } + + // Copy the first sequence of unescaped bytes to the output and obtain a buffer pointer (subslice) + copy(out, in[:firstBackslash]) + in = in[firstBackslash:] + buf := out[firstBackslash:] + + for len(in) > 0 { + // Unescape the next escaped character + inLen, bufLen := unescapeToUTF8(in, buf) + if inLen == -1 { + return nil, MalformedStringEscapeError + } + + in = in[inLen:] + buf = buf[bufLen:] + + // Copy everything up until the next backslash + nextBackslash := bytes.IndexByte(in, '\\') + if nextBackslash == -1 { + copy(buf, in) + buf = buf[len(in):] + break + } else { + copy(buf, in[:nextBackslash]) + buf = buf[nextBackslash:] + in = in[nextBackslash:] + } + } + + // Trim the out buffer to the amount that was actually emitted + return out[:len(out)-len(buf)], nil +} diff --git a/vendor/github.com/buger/jsonparser/parser.go b/vendor/github.com/buger/jsonparser/parser.go new file mode 100644 index 0000000000..5c25200906 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/parser.go @@ -0,0 +1,1211 @@ +package jsonparser + +import ( + "bytes" + "errors" + "fmt" + "math" + "strconv" +) + +// Errors +var ( + KeyPathNotFoundError = errors.New("Key path not found") + UnknownValueTypeError = errors.New("Unknown value type") + MalformedJsonError = errors.New("Malformed JSON error") + MalformedStringError = errors.New("Value is string, but can't find closing '\"' symbol") + MalformedArrayError = errors.New("Value is array, but can't find closing ']' symbol") + MalformedObjectError = errors.New("Value looks like object, but can't find closing '}' symbol") + MalformedValueError = errors.New("Value looks like Number/Boolean/None, but can't find its end: ',' or '}' symbol") + OverflowIntegerError = errors.New("Value is number, but overflowed while parsing") + MalformedStringEscapeError = errors.New("Encountered an invalid escape sequence in a string") +) + +// How much stack space to allocate for unescaping JSON strings; if a string longer +// than this needs to be escaped, it will result in a heap allocation +const unescapeStackBufSize = 64 + +func tokenEnd(data []byte) int { + for i, c := range data { + switch c { + case ' ', '\n', '\r', '\t', ',', '}', ']': + return i + } + } + + return len(data) +} + +func findTokenStart(data []byte, token byte) int { + for i := len(data) - 1; i >= 0; i-- { + switch data[i] { + case token: + return i + case '[', '{': + return 0 + } + } + + return 0 +} + +func findKeyStart(data []byte, key string) (int, error) { + i := 0 + ln := len(data) + if ln > 0 && (data[0] == '{' || data[0] == '[') { + i = 1 + } + var stackbuf [unescapeStackBufSize]byte // stack-allocated array for allocation-free unescaping of small strings + + if ku, err := Unescape(StringToBytes(key), stackbuf[:]); err == nil { + key = bytesToString(&ku) + } + + for i < ln { + switch data[i] { + case '"': + i++ + keyBegin := i + + strEnd, keyEscaped := stringEnd(data[i:]) + if strEnd == -1 { + break + } + i += strEnd + keyEnd := i - 1 + + valueOffset := nextToken(data[i:]) + if valueOffset == -1 { + break + } + + i += valueOffset + + // if string is a key, and key level match + k := data[keyBegin:keyEnd] + // for unescape: if there are no escape sequences, this is cheap; if there are, it is a + // bit more expensive, but causes no allocations unless len(key) > unescapeStackBufSize + if keyEscaped { + if ku, err := Unescape(k, stackbuf[:]); err != nil { + break + } else { + k = ku + } + } + + if data[i] == ':' && len(key) == len(k) && bytesToString(&k) == key { + return keyBegin - 1, nil + } + + case '[': + i = blockEnd(data[i:], data[i], ']') + i + case '{': + i = blockEnd(data[i:], data[i], '}') + i + } + i++ + } + + return -1, KeyPathNotFoundError +} + +func tokenStart(data []byte) int { + for i := len(data) - 1; i >= 0; i-- { + switch data[i] { + case '\n', '\r', '\t', ',', '{', '[': + return i + } + } + + return 0 +} + +// Find position of next character which is not whitespace +func nextToken(data []byte) int { + for i, c := range data { + switch c { + case ' ', '\n', '\r', '\t': + continue + default: + return i + } + } + + return -1 +} + +// Find position of last character which is not whitespace +func lastToken(data []byte) int { + for i := len(data) - 1; i >= 0; i-- { + switch data[i] { + case ' ', '\n', '\r', '\t': + continue + default: + return i + } + } + + return -1 +} + +// Tries to find the end of string +// Support if string contains escaped quote symbols. +func stringEnd(data []byte) (int, bool) { + escaped := false + for i, c := range data { + if c == '"' { + if !escaped { + return i + 1, false + } else { + j := i - 1 + for { + if j < 0 || data[j] != '\\' { + return i + 1, true // even number of backslashes + } + j-- + if j < 0 || data[j] != '\\' { + break // odd number of backslashes + } + j-- + + } + } + } else if c == '\\' { + escaped = true + } + } + + return -1, escaped +} + +// Find end of the data structure, array or object. +// For array openSym and closeSym will be '[' and ']', for object '{' and '}' +func blockEnd(data []byte, openSym byte, closeSym byte) int { + level := 0 + i := 0 + ln := len(data) + + for i < ln { + switch data[i] { + case '"': // If inside string, skip it + se, _ := stringEnd(data[i+1:]) + if se == -1 { + return -1 + } + i += se + case openSym: // If open symbol, increase level + level++ + case closeSym: // If close symbol, increase level + level-- + + // If we have returned to the original level, we're done + if level == 0 { + return i + 1 + } + } + i++ + } + + return -1 +} + +func searchKeys(data []byte, keys ...string) int { + keyLevel := 0 + level := 0 + i := 0 + ln := len(data) + lk := len(keys) + lastMatched := true + + if lk == 0 { + return 0 + } + + var stackbuf [unescapeStackBufSize]byte // stack-allocated array for allocation-free unescaping of small strings + + for i < ln { + switch data[i] { + case '"': + i++ + keyBegin := i + + strEnd, keyEscaped := stringEnd(data[i:]) + if strEnd == -1 { + return -1 + } + i += strEnd + keyEnd := i - 1 + + valueOffset := nextToken(data[i:]) + if valueOffset == -1 { + return -1 + } + + i += valueOffset + + // if string is a key + if data[i] == ':' { + if level < 1 { + return -1 + } + + key := data[keyBegin:keyEnd] + + // for unescape: if there are no escape sequences, this is cheap; if there are, it is a + // bit more expensive, but causes no allocations unless len(key) > unescapeStackBufSize + var keyUnesc []byte + if !keyEscaped { + keyUnesc = key + } else if ku, err := Unescape(key, stackbuf[:]); err != nil { + return -1 + } else { + keyUnesc = ku + } + + if equalStr(&keyUnesc, keys[level-1]) { + lastMatched = true + + // if key level match + if keyLevel == level-1 { + keyLevel++ + // If we found all keys in path + if keyLevel == lk { + return i + 1 + } + } + } else { + lastMatched = false + } + } else { + i-- + } + case '{': + + // in case parent key is matched then only we will increase the level otherwise can directly + // can move to the end of this block + if !lastMatched { + end := blockEnd(data[i:], '{', '}') + i += end - 1 + } else{ + level++ + } + case '}': + level-- + if level == keyLevel { + keyLevel-- + } + case '[': + // If we want to get array element by index + if keyLevel == level && keys[level][0] == '[' { + aIdx, err := strconv.Atoi(keys[level][1 : len(keys[level])-1]) + if err != nil { + return -1 + } + var curIdx int + var valueFound []byte + var valueOffset int + var curI = i + ArrayEach(data[i:], func(value []byte, dataType ValueType, offset int, err error) { + if curIdx == aIdx { + valueFound = value + valueOffset = offset + if dataType == String { + valueOffset = valueOffset - 2 + valueFound = data[curI+valueOffset : curI+valueOffset+len(value)+2] + } + } + curIdx += 1 + }) + + if valueFound == nil { + return -1 + } else { + subIndex := searchKeys(valueFound, keys[level+1:]...) + if subIndex < 0 { + return -1 + } + return i + valueOffset + subIndex + } + } else { + // Do not search for keys inside arrays + if arraySkip := blockEnd(data[i:], '[', ']'); arraySkip == -1 { + return -1 + } else { + i += arraySkip - 1 + } + } + } + + i++ + } + + return -1 +} + +var bitwiseFlags []int64 + +func init() { + for i := 0; i < 63; i++ { + bitwiseFlags = append(bitwiseFlags, int64(math.Pow(2, float64(i)))) + } +} + +func sameTree(p1, p2 []string) bool { + minLen := len(p1) + if len(p2) < minLen { + minLen = len(p2) + } + + for pi_1, p_1 := range p1[:minLen] { + if p2[pi_1] != p_1 { + return false + } + } + + return true +} + +func EachKey(data []byte, cb func(int, []byte, ValueType, error), paths ...[]string) int { + var pathFlags int64 + var level, pathsMatched, i int + ln := len(data) + + var maxPath int + for _, p := range paths { + if len(p) > maxPath { + maxPath = len(p) + } + } + + var stackbuf [unescapeStackBufSize]byte // stack-allocated array for allocation-free unescaping of small strings + pathsBuf := make([]string, maxPath) + + for i < ln { + switch data[i] { + case '"': + i++ + keyBegin := i + + strEnd, keyEscaped := stringEnd(data[i:]) + if strEnd == -1 { + return -1 + } + i += strEnd + + keyEnd := i - 1 + + valueOffset := nextToken(data[i:]) + if valueOffset == -1 { + return -1 + } + + i += valueOffset + + // if string is a key, and key level match + if data[i] == ':' { + match := -1 + key := data[keyBegin:keyEnd] + + // for unescape: if there are no escape sequences, this is cheap; if there are, it is a + // bit more expensive, but causes no allocations unless len(key) > unescapeStackBufSize + var keyUnesc []byte + if !keyEscaped { + keyUnesc = key + } else if ku, err := Unescape(key, stackbuf[:]); err != nil { + return -1 + } else { + keyUnesc = ku + } + + if maxPath >= level { + if level < 1 { + cb(-1, nil, Unknown, MalformedJsonError) + return -1 + } + + pathsBuf[level-1] = bytesToString(&keyUnesc) + for pi, p := range paths { + if len(p) != level || pathFlags&bitwiseFlags[pi+1] != 0 || !equalStr(&keyUnesc, p[level-1]) || !sameTree(p, pathsBuf[:level]) { + continue + } + + match = pi + + i++ + pathsMatched++ + pathFlags |= bitwiseFlags[pi+1] + + v, dt, of, e := Get(data[i:]) + cb(pi, v, dt, e) + + if of != -1 { + i += of + } + + if pathsMatched == len(paths) { + break + } + } + if pathsMatched == len(paths) { + return i + } + } + + if match == -1 { + tokenOffset := nextToken(data[i+1:]) + i += tokenOffset + + if data[i] == '{' { + blockSkip := blockEnd(data[i:], '{', '}') + i += blockSkip + 1 + } + } + + if i < ln { + switch data[i] { + case '{', '}', '[', '"': + i-- + } + } + } else { + i-- + } + case '{': + level++ + case '}': + level-- + case '[': + var arrIdxFlags int64 + var pIdxFlags int64 + + if level < 0 { + cb(-1, nil, Unknown, MalformedJsonError) + return -1 + } + + for pi, p := range paths { + if len(p) < level+1 || pathFlags&bitwiseFlags[pi+1] != 0 || p[level][0] != '[' || !sameTree(p, pathsBuf[:level]) { + continue + } + + aIdx, _ := strconv.Atoi(p[level][1 : len(p[level])-1]) + arrIdxFlags |= bitwiseFlags[aIdx+1] + pIdxFlags |= bitwiseFlags[pi+1] + } + + if arrIdxFlags > 0 { + level++ + + var curIdx int + arrOff, _ := ArrayEach(data[i:], func(value []byte, dataType ValueType, offset int, err error) { + if arrIdxFlags&bitwiseFlags[curIdx+1] != 0 { + for pi, p := range paths { + if pIdxFlags&bitwiseFlags[pi+1] != 0 { + aIdx, _ := strconv.Atoi(p[level-1][1 : len(p[level-1])-1]) + + if curIdx == aIdx { + of := searchKeys(value, p[level:]...) + + pathsMatched++ + pathFlags |= bitwiseFlags[pi+1] + + if of != -1 { + v, dt, _, e := Get(value[of:]) + cb(pi, v, dt, e) + } + } + } + } + } + + curIdx += 1 + }) + + if pathsMatched == len(paths) { + return i + } + + i += arrOff - 1 + } else { + // Do not search for keys inside arrays + if arraySkip := blockEnd(data[i:], '[', ']'); arraySkip == -1 { + return -1 + } else { + i += arraySkip - 1 + } + } + case ']': + level-- + } + + i++ + } + + return -1 +} + +// Data types available in valid JSON data. +type ValueType int + +const ( + NotExist = ValueType(iota) + String + Number + Object + Array + Boolean + Null + Unknown +) + +func (vt ValueType) String() string { + switch vt { + case NotExist: + return "non-existent" + case String: + return "string" + case Number: + return "number" + case Object: + return "object" + case Array: + return "array" + case Boolean: + return "boolean" + case Null: + return "null" + default: + return "unknown" + } +} + +var ( + trueLiteral = []byte("true") + falseLiteral = []byte("false") + nullLiteral = []byte("null") +) + +func createInsertComponent(keys []string, setValue []byte, comma, object bool) []byte { + var buffer bytes.Buffer + isIndex := string(keys[0][0]) == "[" + if comma { + buffer.WriteString(",") + } + if isIndex { + buffer.WriteString("[") + } else { + if object { + buffer.WriteString("{") + } + buffer.WriteString("\"") + buffer.WriteString(keys[0]) + buffer.WriteString("\":") + } + + for i := 1; i < len(keys); i++ { + if string(keys[i][0]) == "[" { + buffer.WriteString("[") + } else { + buffer.WriteString("{\"") + buffer.WriteString(keys[i]) + buffer.WriteString("\":") + } + } + buffer.Write(setValue) + for i := len(keys) - 1; i > 0; i-- { + if string(keys[i][0]) == "[" { + buffer.WriteString("]") + } else { + buffer.WriteString("}") + } + } + if isIndex { + buffer.WriteString("]") + } + if object && !isIndex { + buffer.WriteString("}") + } + return buffer.Bytes() +} + +/* + +Del - Receives existing data structure, path to delete. + +Returns: +`data` - return modified data + +*/ +func Delete(data []byte, keys ...string) []byte { + lk := len(keys) + if lk == 0 { + return data[:0] + } + + array := false + if len(keys[lk-1]) > 0 && string(keys[lk-1][0]) == "[" { + array = true + } + + var startOffset, keyOffset int + endOffset := len(data) + var err error + if !array { + if len(keys) > 1 { + _, _, startOffset, endOffset, err = internalGet(data, keys[:lk-1]...) + if err == KeyPathNotFoundError { + // problem parsing the data + return data + } + } + + keyOffset, err = findKeyStart(data[startOffset:endOffset], keys[lk-1]) + if err == KeyPathNotFoundError { + // problem parsing the data + return data + } + keyOffset += startOffset + _, _, _, subEndOffset, _ := internalGet(data[startOffset:endOffset], keys[lk-1]) + endOffset = startOffset + subEndOffset + tokEnd := tokenEnd(data[endOffset:]) + tokStart := findTokenStart(data[:keyOffset], ","[0]) + + if data[endOffset+tokEnd] == ","[0] { + endOffset += tokEnd + 1 + } else if data[endOffset+tokEnd] == " "[0] && len(data) > endOffset+tokEnd+1 && data[endOffset+tokEnd+1] == ","[0] { + endOffset += tokEnd + 2 + } else if data[endOffset+tokEnd] == "}"[0] && data[tokStart] == ","[0] { + keyOffset = tokStart + } + } else { + _, _, keyOffset, endOffset, err = internalGet(data, keys...) + if err == KeyPathNotFoundError { + // problem parsing the data + return data + } + + tokEnd := tokenEnd(data[endOffset:]) + tokStart := findTokenStart(data[:keyOffset], ","[0]) + + if data[endOffset+tokEnd] == ","[0] { + endOffset += tokEnd + 1 + } else if data[endOffset+tokEnd] == "]"[0] && data[tokStart] == ","[0] { + keyOffset = tokStart + } + } + + // We need to remove remaining trailing comma if we delete las element in the object + prevTok := lastToken(data[:keyOffset]) + remainedValue := data[endOffset:] + + var newOffset int + if nextToken(remainedValue) > -1 && remainedValue[nextToken(remainedValue)] == '}' && data[prevTok] == ',' { + newOffset = prevTok + } else { + newOffset = prevTok + 1 + } + + data = append(data[:newOffset], data[endOffset:]...) + return data +} + +/* + +Set - Receives existing data structure, path to set, and data to set at that key. + +Returns: +`value` - modified byte array +`err` - On any parsing error + +*/ +func Set(data []byte, setValue []byte, keys ...string) (value []byte, err error) { + // ensure keys are set + if len(keys) == 0 { + return nil, KeyPathNotFoundError + } + + _, _, startOffset, endOffset, err := internalGet(data, keys...) + if err != nil { + if err != KeyPathNotFoundError { + // problem parsing the data + return nil, err + } + // full path doesnt exist + // does any subpath exist? + var depth int + for i := range keys { + _, _, start, end, sErr := internalGet(data, keys[:i+1]...) + if sErr != nil { + break + } else { + endOffset = end + startOffset = start + depth++ + } + } + comma := true + object := false + if endOffset == -1 { + firstToken := nextToken(data) + // We can't set a top-level key if data isn't an object + if len(data) == 0 || data[firstToken] != '{' { + return nil, KeyPathNotFoundError + } + // Don't need a comma if the input is an empty object + secondToken := firstToken + 1 + nextToken(data[firstToken+1:]) + if data[secondToken] == '}' { + comma = false + } + // Set the top level key at the end (accounting for any trailing whitespace) + // This assumes last token is valid like '}', could check and return error + endOffset = lastToken(data) + } + depthOffset := endOffset + if depth != 0 { + // if subpath is a non-empty object, add to it + if data[startOffset] == '{' && data[startOffset+1+nextToken(data[startOffset+1:])] != '}' { + depthOffset-- + startOffset = depthOffset + // otherwise, over-write it with a new object + } else { + comma = false + object = true + } + } else { + startOffset = depthOffset + } + value = append(data[:startOffset], append(createInsertComponent(keys[depth:], setValue, comma, object), data[depthOffset:]...)...) + } else { + // path currently exists + startComponent := data[:startOffset] + endComponent := data[endOffset:] + + value = make([]byte, len(startComponent)+len(endComponent)+len(setValue)) + newEndOffset := startOffset + len(setValue) + copy(value[0:startOffset], startComponent) + copy(value[startOffset:newEndOffset], setValue) + copy(value[newEndOffset:], endComponent) + } + return value, nil +} + +func getType(data []byte, offset int) ([]byte, ValueType, int, error) { + var dataType ValueType + endOffset := offset + + // if string value + if data[offset] == '"' { + dataType = String + if idx, _ := stringEnd(data[offset+1:]); idx != -1 { + endOffset += idx + 1 + } else { + return nil, dataType, offset, MalformedStringError + } + } else if data[offset] == '[' { // if array value + dataType = Array + // break label, for stopping nested loops + endOffset = blockEnd(data[offset:], '[', ']') + + if endOffset == -1 { + return nil, dataType, offset, MalformedArrayError + } + + endOffset += offset + } else if data[offset] == '{' { // if object value + dataType = Object + // break label, for stopping nested loops + endOffset = blockEnd(data[offset:], '{', '}') + + if endOffset == -1 { + return nil, dataType, offset, MalformedObjectError + } + + endOffset += offset + } else { + // Number, Boolean or None + end := tokenEnd(data[endOffset:]) + + if end == -1 { + return nil, dataType, offset, MalformedValueError + } + + value := data[offset : endOffset+end] + + switch data[offset] { + case 't', 'f': // true or false + if bytes.Equal(value, trueLiteral) || bytes.Equal(value, falseLiteral) { + dataType = Boolean + } else { + return nil, Unknown, offset, UnknownValueTypeError + } + case 'u', 'n': // undefined or null + if bytes.Equal(value, nullLiteral) { + dataType = Null + } else { + return nil, Unknown, offset, UnknownValueTypeError + } + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-': + dataType = Number + default: + return nil, Unknown, offset, UnknownValueTypeError + } + + endOffset += end + } + return data[offset:endOffset], dataType, endOffset, nil +} + +/* +Get - Receives data structure, and key path to extract value from. + +Returns: +`value` - Pointer to original data structure containing key value, or just empty slice if nothing found or error +`dataType` - Can be: `NotExist`, `String`, `Number`, `Object`, `Array`, `Boolean` or `Null` +`offset` - Offset from provided data structure where key value ends. Used mostly internally, for example for `ArrayEach` helper. +`err` - If key not found or any other parsing issue it should return error. If key not found it also sets `dataType` to `NotExist` + +Accept multiple keys to specify path to JSON value (in case of quering nested structures). +If no keys provided it will try to extract closest JSON value (simple ones or object/array), useful for reading streams or arrays, see `ArrayEach` implementation. +*/ +func Get(data []byte, keys ...string) (value []byte, dataType ValueType, offset int, err error) { + a, b, _, d, e := internalGet(data, keys...) + return a, b, d, e +} + +func internalGet(data []byte, keys ...string) (value []byte, dataType ValueType, offset, endOffset int, err error) { + if len(keys) > 0 { + if offset = searchKeys(data, keys...); offset == -1 { + return nil, NotExist, -1, -1, KeyPathNotFoundError + } + } + + // Go to closest value + nO := nextToken(data[offset:]) + if nO == -1 { + return nil, NotExist, offset, -1, MalformedJsonError + } + + offset += nO + value, dataType, endOffset, err = getType(data, offset) + if err != nil { + return value, dataType, offset, endOffset, err + } + + // Strip quotes from string values + if dataType == String { + value = value[1 : len(value)-1] + } + + return value, dataType, offset, endOffset, nil +} + +// ArrayEach is used when iterating arrays, accepts a callback function with the same return arguments as `Get`. +func ArrayEach(data []byte, cb func(value []byte, dataType ValueType, offset int, err error), keys ...string) (offset int, err error) { + if len(data) == 0 { + return -1, MalformedObjectError + } + + offset = 1 + + if len(keys) > 0 { + if offset = searchKeys(data, keys...); offset == -1 { + return offset, KeyPathNotFoundError + } + + // Go to closest value + nO := nextToken(data[offset:]) + if nO == -1 { + return offset, MalformedJsonError + } + + offset += nO + + if data[offset] != '[' { + return offset, MalformedArrayError + } + + offset++ + } + + nO := nextToken(data[offset:]) + if nO == -1 { + return offset, MalformedJsonError + } + + offset += nO + + if data[offset] == ']' { + return offset, nil + } + + for true { + v, t, o, e := Get(data[offset:]) + + if e != nil { + return offset, e + } + + if o == 0 { + break + } + + if t != NotExist { + cb(v, t, offset+o-len(v), e) + } + + if e != nil { + break + } + + offset += o + + skipToToken := nextToken(data[offset:]) + if skipToToken == -1 { + return offset, MalformedArrayError + } + offset += skipToToken + + if data[offset] == ']' { + break + } + + if data[offset] != ',' { + return offset, MalformedArrayError + } + + offset++ + } + + return offset, nil +} + +// ObjectEach iterates over the key-value pairs of a JSON object, invoking a given callback for each such entry +func ObjectEach(data []byte, callback func(key []byte, value []byte, dataType ValueType, offset int) error, keys ...string) (err error) { + var stackbuf [unescapeStackBufSize]byte // stack-allocated array for allocation-free unescaping of small strings + offset := 0 + + // Descend to the desired key, if requested + if len(keys) > 0 { + if off := searchKeys(data, keys...); off == -1 { + return KeyPathNotFoundError + } else { + offset = off + } + } + + // Validate and skip past opening brace + if off := nextToken(data[offset:]); off == -1 { + return MalformedObjectError + } else if offset += off; data[offset] != '{' { + return MalformedObjectError + } else { + offset++ + } + + // Skip to the first token inside the object, or stop if we find the ending brace + if off := nextToken(data[offset:]); off == -1 { + return MalformedJsonError + } else if offset += off; data[offset] == '}' { + return nil + } + + // Loop pre-condition: data[offset] points to what should be either the next entry's key, or the closing brace (if it's anything else, the JSON is malformed) + for offset < len(data) { + // Step 1: find the next key + var key []byte + + // Check what the the next token is: start of string, end of object, or something else (error) + switch data[offset] { + case '"': + offset++ // accept as string and skip opening quote + case '}': + return nil // we found the end of the object; stop and return success + default: + return MalformedObjectError + } + + // Find the end of the key string + var keyEscaped bool + if off, esc := stringEnd(data[offset:]); off == -1 { + return MalformedJsonError + } else { + key, keyEscaped = data[offset:offset+off-1], esc + offset += off + } + + // Unescape the string if needed + if keyEscaped { + if keyUnescaped, err := Unescape(key, stackbuf[:]); err != nil { + return MalformedStringEscapeError + } else { + key = keyUnescaped + } + } + + // Step 2: skip the colon + if off := nextToken(data[offset:]); off == -1 { + return MalformedJsonError + } else if offset += off; data[offset] != ':' { + return MalformedJsonError + } else { + offset++ + } + + // Step 3: find the associated value, then invoke the callback + if value, valueType, off, err := Get(data[offset:]); err != nil { + return err + } else if err := callback(key, value, valueType, offset+off); err != nil { // Invoke the callback here! + return err + } else { + offset += off + } + + // Step 4: skip over the next comma to the following token, or stop if we hit the ending brace + if off := nextToken(data[offset:]); off == -1 { + return MalformedArrayError + } else { + offset += off + switch data[offset] { + case '}': + return nil // Stop if we hit the close brace + case ',': + offset++ // Ignore the comma + default: + return MalformedObjectError + } + } + + // Skip to the next token after the comma + if off := nextToken(data[offset:]); off == -1 { + return MalformedArrayError + } else { + offset += off + } + } + + return MalformedObjectError // we shouldn't get here; it's expected that we will return via finding the ending brace +} + +// GetUnsafeString returns the value retrieved by `Get`, use creates string without memory allocation by mapping string to slice memory. It does not handle escape symbols. +func GetUnsafeString(data []byte, keys ...string) (val string, err error) { + v, _, _, e := Get(data, keys...) + + if e != nil { + return "", e + } + + return bytesToString(&v), nil +} + +// GetString returns the value retrieved by `Get`, cast to a string if possible, trying to properly handle escape and utf8 symbols +// If key data type do not match, it will return an error. +func GetString(data []byte, keys ...string) (val string, err error) { + v, t, _, e := Get(data, keys...) + + if e != nil { + return "", e + } + + if t != String { + return "", fmt.Errorf("Value is not a string: %s", string(v)) + } + + // If no escapes return raw conten + if bytes.IndexByte(v, '\\') == -1 { + return string(v), nil + } + + return ParseString(v) +} + +// GetFloat returns the value retrieved by `Get`, cast to a float64 if possible. +// The offset is the same as in `Get`. +// If key data type do not match, it will return an error. +func GetFloat(data []byte, keys ...string) (val float64, err error) { + v, t, _, e := Get(data, keys...) + + if e != nil { + return 0, e + } + + if t != Number { + return 0, fmt.Errorf("Value is not a number: %s", string(v)) + } + + return ParseFloat(v) +} + +// GetInt returns the value retrieved by `Get`, cast to a int64 if possible. +// If key data type do not match, it will return an error. +func GetInt(data []byte, keys ...string) (val int64, err error) { + v, t, _, e := Get(data, keys...) + + if e != nil { + return 0, e + } + + if t != Number { + return 0, fmt.Errorf("Value is not a number: %s", string(v)) + } + + return ParseInt(v) +} + +// GetBoolean returns the value retrieved by `Get`, cast to a bool if possible. +// The offset is the same as in `Get`. +// If key data type do not match, it will return error. +func GetBoolean(data []byte, keys ...string) (val bool, err error) { + v, t, _, e := Get(data, keys...) + + if e != nil { + return false, e + } + + if t != Boolean { + return false, fmt.Errorf("Value is not a boolean: %s", string(v)) + } + + return ParseBoolean(v) +} + +// ParseBoolean parses a Boolean ValueType into a Go bool (not particularly useful, but here for completeness) +func ParseBoolean(b []byte) (bool, error) { + switch { + case bytes.Equal(b, trueLiteral): + return true, nil + case bytes.Equal(b, falseLiteral): + return false, nil + default: + return false, MalformedValueError + } +} + +// ParseString parses a String ValueType into a Go string (the main parsing work is unescaping the JSON string) +func ParseString(b []byte) (string, error) { + var stackbuf [unescapeStackBufSize]byte // stack-allocated array for allocation-free unescaping of small strings + if bU, err := Unescape(b, stackbuf[:]); err != nil { + return "", MalformedValueError + } else { + return string(bU), nil + } +} + +// ParseNumber parses a Number ValueType into a Go float64 +func ParseFloat(b []byte) (float64, error) { + if v, err := parseFloat(&b); err != nil { + return 0, MalformedValueError + } else { + return v, nil + } +} + +// ParseInt parses a Number ValueType into a Go int64 +func ParseInt(b []byte) (int64, error) { + if v, ok, overflow := parseInt(b); !ok { + if overflow { + return 0, OverflowIntegerError + } + return 0, MalformedValueError + } else { + return v, nil + } +} diff --git a/vendor/github.com/chai2010/gettext-go/.travis.yml b/vendor/github.com/chai2010/gettext-go/.travis.yml deleted file mode 100644 index fb74de6b87..0000000000 --- a/vendor/github.com/chai2010/gettext-go/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go - -go: - - 1.3 - - 1.4 - - 1.5 - - tip diff --git a/vendor/github.com/chai2010/gettext-go/README.md b/vendor/github.com/chai2010/gettext-go/README.md deleted file mode 100644 index 75a5a16f46..0000000000 --- a/vendor/github.com/chai2010/gettext-go/README.md +++ /dev/null @@ -1,58 +0,0 @@ -gettext-go -========== - -PkgDoc: [http://godoc.org/github.com/chai2010/gettext-go/gettext](http://godoc.org/github.com/chai2010/gettext-go/gettext) - -Install -======== - -1. `go get github.com/chai2010/gettext-go/gettext` -2. `go run hello.go` - -The godoc.org or gowalker.org has more information. - -Example -======= - -```Go -package main - -import ( - "fmt" - - "github.com/chai2010/gettext-go/gettext" -) - -func main() { - gettext.SetLocale("zh_CN") - gettext.Textdomain("hello") - - gettext.BindTextdomain("hello", "local", nil) - - // gettext.BindTextdomain("hello", "local", nil) // from local dir - // gettext.BindTextdomain("hello", "local.zip", nil) // from local zip file - // gettext.BindTextdomain("hello", "local.zip", zipData) // from embedded zip data - - // translate source text - fmt.Println(gettext.Gettext("Hello, world!")) - // Output: 你好, 世界! - - // if no msgctxt in PO file (only msgid and msgstr), - // specify context as "" by - fmt.Println(gettext.PGettext("", "Hello, world!")) - // Output: 你好, 世界! - - // translate resource - fmt.Println(string(gettext.Getdata("poems.txt")))) - // Output: ... -} -``` - -Go file: [hello.go](https://github.com/chai2010/gettext-go/blob/master/examples/hello.go); PO file: [hello.po](https://github.com/chai2010/gettext-go/blob/master/examples/local/default/LC_MESSAGES/hello.po); - -BUGS -==== - -Please report bugs to . - -Thanks! diff --git a/vendor/github.com/cloudflare/cfssl/.dockerignore b/vendor/github.com/cloudflare/cfssl/.dockerignore deleted file mode 100644 index 3f63ce68d5..0000000000 --- a/vendor/github.com/cloudflare/cfssl/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -cfssl_* -*-amd64 -*-386 -dist/* diff --git a/vendor/github.com/cloudflare/cfssl/.gitignore b/vendor/github.com/cloudflare/cfssl/.gitignore deleted file mode 100644 index 4cd8c32264..0000000000 --- a/vendor/github.com/cloudflare/cfssl/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -dist/* -cli/serve/static.rice-box.go -.coverprofile -coverprofile.txt -gopath diff --git a/vendor/github.com/cloudflare/cfssl/.travis.yml b/vendor/github.com/cloudflare/cfssl/.travis.yml deleted file mode 100644 index 9f4102d6dc..0000000000 --- a/vendor/github.com/cloudflare/cfssl/.travis.yml +++ /dev/null @@ -1,74 +0,0 @@ -sudo: false -language: go -go: - - 1.8.x - - 1.9.x - - 1.10.x - - master -# Install g++-4.8 to support std=c++11 for github.com/google/certificate-transparency/go/merkletree -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 -install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi - -# Used by the certdb tests -services: - - mysql - - postgresql -before_install: - # CFSSL consists of multiple Go packages, which refer to each other by - # their absolute GitHub path, e.g. github.com/cloudflare/crypto/pkcs7. - # That means, by default, if someone forks the repo and makes changes across - # multiple packages within CFSSL, Travis won't pass for the branch on their - # own repo. To fix that, we move the directory - - mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/cloudflare - - test ! -d $GOPATH/src/github.com/cloudflare/cfssl && mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/cloudflare/cfssl || true - -# Only build pull requests, pushes to the master branch, and branches -# starting with `test-`. This is a convenient way to push branches to -# your own fork of the repostiory to ensure Travis passes before submitting -# a PR. For instance, you might run: -# git push myremote branchname:test-branchname -branches: - only: - - master - - /^test-.*$/ - -before_script: - - go get -u github.com/golang/lint/golint - - go get -v github.com/GeertJohan/fgt - # Setup DBs + run migrations - - go get bitbucket.org/liamstask/goose/cmd/goose - - if [[ $(uname -s) == 'Linux' ]]; then - psql -c 'create database certdb_development;' -U postgres; - goose -path $GOPATH/src/github.com/cloudflare/cfssl/certdb/pg up; - mysql -e 'create database certdb_development;' -u root; - goose -path $GOPATH/src/github.com/cloudflare/cfssl/certdb/mysql up; - fi -script: - - ./test.sh -notifications: - email: - recipients: - - cbroglie@cloudflare.com - - kyle@cloudflare.com - - nick@cloudflare.com - on_success: never - on_failure: change -env: - global: - - secure: "OmaaZ3jhU9VQ/0SYpenUJEfnmKy/MwExkefFRpDbkRSu/hTQpxxALAZV5WEHo7gxLRMRI0pytLo7w+lAd2FlX1CNcyY62MUicta/8P2twsxp+lR3v1bJ7dwk6qsDbO7Nvv3BKPCDQCHUkggbAEJaHEQGdLk4ursNEB1aGimuCEc=" - - GO15VENDOREXPERIMENT=1 - matrix: - - BUILD_TAGS="postgresql mysql" -matrix: - include: - - os: osx - go: 1.8.1 - env: BUILD_TAGS= -after_success: - - bash <(curl -s https://codecov.io/bash) -f coverprofile.txt diff --git a/vendor/github.com/cloudflare/cfssl/BUILDING.md b/vendor/github.com/cloudflare/cfssl/BUILDING.md deleted file mode 100644 index 8b545d88bc..0000000000 --- a/vendor/github.com/cloudflare/cfssl/BUILDING.md +++ /dev/null @@ -1,38 +0,0 @@ -# How to Build CFSSL - -## Docker - -The requirements to build `CFSSL` are: - -1. A running instance of Docker -2. The `bash` shell - -To build, run: - - $ script/build-docker - -This is will build by default all the cfssl command line utilities -for darwin (OSX), linux, and windows for i386 and amd64 and output the -binaries in the current path. - -To build a specific platform and OS, run: - - $ script/build-docker -os="darwin" -arch="amd64" - -Note: for cross-compilation compatibility, the Docker build process will -build programs without PKCS #11. - -## Without Docker - -The requirements to build without Docker are: - -1. Go version 1.5 is the minimum required version of Go. However, only Go 1.6+ - is supported due to the test system not supporting Go 1.5. -2. A properly configured go environment -3. A properly configured GOPATH -4. With Go 1.5, you are required to set the environment variable - `GO15VENDOREXPERIMENT=1`. - -Run: - - $ go install github.com/cloudflare/cfssl/cmd/... diff --git a/vendor/github.com/cloudflare/cfssl/CHANGELOG b/vendor/github.com/cloudflare/cfssl/CHANGELOG deleted file mode 100644 index fdba571180..0000000000 --- a/vendor/github.com/cloudflare/cfssl/CHANGELOG +++ /dev/null @@ -1,72 +0,0 @@ -1.1.0 - 2015-08-04 - -ADDED: - - Revocation now checks OCSP status. - - Authenticated endpoints are now supported using HMAC tags. - - Bundle can verify certificates against a domain or IP. - - OCSP subcommand has been added. - - PKCS #11 keys are now supported; this support is now the default. - - OCSP serving is now implemented. - - The multirootca tool is now available for multiple signing - keys via an authenticated API. - - A scan utility for checking the quality of a server's TLS - configuration. - - The certificate bundler now supports PKCS #7 and PKCS #12. - - An info endpoint has been added to retrieve the signers' - certificates. - - Signers can now use a serial sequence number for certificate - serial numbers; the default remains randomised serial numbers. - - CSR whitelisting allows the signer to explicitly distrust - certain fields in a CSR. - - Signing profiles can include certificate policies and their - qualifiers. - - The multirootca can use Red October-secured private keys. - - The multirootca can whitelist CSRs per-signer based on an - IP network whitelist. - - The signer can whitelist SANs and common names via a regular- - expression whitelist. - - Multiple fallback remote signers are now supported in the - cfssl server. - - A Docker build script has been provided to facilitate building - CFSSL for all supported platforms. - - The log package includes a new logging level, fatal, that - immediately exits with error after printing the log message. - -CHANGED: - - CLI tool can read from standard input. - - The -f flag has been renamed to -config. - - Signers have been refactored into local and remote signers - under a single universal signer abstraction. - - The CLI subcommands have been refactored into separate - packages. - - Signing can now extract subject information from a CSR. - - Various improvements to the certificate ubiquity scoring, - such as accounting for SHA1 deprecation. - - The bundle CLI tool can set the intermediates directory that - newly found intermediates can be stored in. - - The CLI tools return exit code 1 on failure. - -CONTRIBUTORS: - Alice Xia - Dan Rohr - Didier Smith - Dominic Luechinger - Erik Kristensen - Fabian Ruff - George Tankersley - Harald Wagener - Harry Harpham - Jacob H. Haven - Jacob Hoffman-Andrews - Joshua Kroll - Kyle Isom - Nick Sullivan - Peter Eckersley - Richard Barnes - Sophie Huang - Steve Rude - Tara Vancil - Terin Stock - Thomaz Leite - Travis Truman - Zi Lin diff --git a/vendor/github.com/cloudflare/cfssl/Dockerfile b/vendor/github.com/cloudflare/cfssl/Dockerfile deleted file mode 100644 index 728c74efa5..0000000000 --- a/vendor/github.com/cloudflare/cfssl/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM golang:1.9.2 - -ENV USER root - -WORKDIR /go/src/github.com/cloudflare/cfssl -COPY . . - -# restore all deps and build -RUN go get github.com/cloudflare/cfssl_trust/... && \ - go get github.com/GeertJohan/go.rice/rice && \ - rice embed-go -i=./cli/serve && \ - cp -R /go/src/github.com/cloudflare/cfssl_trust /etc/cfssl && \ - go install ./cmd/... - -EXPOSE 8888 - -ENTRYPOINT ["cfssl"] -CMD ["--help"] diff --git a/vendor/github.com/cloudflare/cfssl/Dockerfile.build b/vendor/github.com/cloudflare/cfssl/Dockerfile.build deleted file mode 100644 index fd7f1a8ee8..0000000000 --- a/vendor/github.com/cloudflare/cfssl/Dockerfile.build +++ /dev/null @@ -1,11 +0,0 @@ -FROM golang:1.9.2 - -ENV USER root - -WORKDIR /go/src/github.com/cloudflare/cfssl -COPY . . - -# restore all deps and build -RUN go get github.com/mitchellh/gox - -ENTRYPOINT ["gox"] diff --git a/vendor/github.com/cloudflare/cfssl/Dockerfile.minimal b/vendor/github.com/cloudflare/cfssl/Dockerfile.minimal deleted file mode 100644 index 3c80825e18..0000000000 --- a/vendor/github.com/cloudflare/cfssl/Dockerfile.minimal +++ /dev/null @@ -1,30 +0,0 @@ -FROM golang:1.9.2-alpine3.6 - -ENV GOPATH /go -ENV USER root - -COPY . /go/src/github.com/cloudflare/cfssl - -RUN set -x && \ - apk --no-cache add git gcc libc-dev && \ - go get github.com/cloudflare/cfssl_trust/... && \ - go get github.com/GeertJohan/go.rice/rice && \ - cd /go/src/github.com/cloudflare/cfssl && rice embed-go -i=./cli/serve && \ - mkdir bin && cd bin && \ - go build ../cmd/cfssl && \ - go build ../cmd/cfssljson && \ - go build ../cmd/mkbundle && \ - go build ../cmd/multirootca && \ - echo "Build complete." - -FROM alpine:3.6 -COPY --from=0 /go/src/github.com/cloudflare/cfssl_trust /etc/cfssl -COPY --from=0 /go/src/github.com/cloudflare/cfssl/bin/ /usr/bin - -VOLUME [ "/etc/cfssl" ] -WORKDIR /etc/cfssl - -EXPOSE 8888 - -ENTRYPOINT ["cfssl"] -CMD ["--help"] diff --git a/vendor/github.com/cloudflare/cfssl/Gopkg.lock b/vendor/github.com/cloudflare/cfssl/Gopkg.lock deleted file mode 100644 index be0d3ade69..0000000000 --- a/vendor/github.com/cloudflare/cfssl/Gopkg.lock +++ /dev/null @@ -1,186 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - name = "github.com/GeertJohan/go.rice" - packages = [ - ".", - "embedded" - ] - revision = "c02ca9a983da5807ddf7d796784928f5be4afd09" - -[[projects]] - name = "github.com/certifi/gocertifi" - packages = ["."] - revision = "deb3ae2ef2610fde3330947281941c562861188b" - version = "2018.01.18" - -[[projects]] - branch = "master" - name = "github.com/cloudflare/backoff" - packages = ["."] - revision = "647f3cdfc87a18586e279c97afd6526d01b0d063" - -[[projects]] - branch = "master" - name = "github.com/cloudflare/go-metrics" - packages = ["."] - revision = "6a9aea36fb410b71add0d0e58438e0cfc44d3076" - -[[projects]] - branch = "master" - name = "github.com/cloudflare/redoctober" - packages = [ - "client", - "config", - "core", - "cryptor", - "ecdh", - "hipchat", - "keycache", - "msp", - "order", - "padding", - "passvault", - "persist", - "report", - "symcrypt" - ] - revision = "746a508df14c565d2074e2919d27c2efd1a7fe89" - -[[projects]] - branch = "master" - name = "github.com/daaku/go.zipexe" - packages = ["."] - revision = "a5fe2436ffcb3236e175e5149162b41cd28bd27d" - -[[projects]] - branch = "master" - name = "github.com/getsentry/raven-go" - packages = ["."] - revision = "563b81fc02b75d664e54da31f787c2cc2186780b" - -[[projects]] - name = "github.com/go-sql-driver/mysql" - packages = ["."] - revision = "a0583e0143b1624142adab07e0e97fe106d99561" - version = "v1.3" - -[[projects]] - name = "github.com/gogo/protobuf" - packages = ["proto"] - revision = "1adfc126b41513cc696b209667c8656ea7aac67c" - version = "v1.0.0" - -[[projects]] - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp" - ] - revision = "925541529c1fa6821df4e44ce2723319eb2be768" - version = "v1.0.0" - -[[projects]] - name = "github.com/google/certificate-transparency-go" - packages = [ - ".", - "asn1", - "client", - "client/configpb", - "jsonclient", - "tls", - "x509", - "x509/pkix" - ] - revision = "5ab67e519c93568ac3ee50fd6772a5bcf8aa460d" - -[[projects]] - name = "github.com/jmhodges/clock" - packages = ["."] - revision = "880ee4c335489bc78d01e4d0a254ae880734bc15" - version = "v1.1" - -[[projects]] - branch = "master" - name = "github.com/jmoiron/sqlx" - packages = [ - ".", - "reflectx" - ] - revision = "05cef0741ade10ca668982355b3f3f0bcf0ff0a8" - -[[projects]] - branch = "master" - name = "github.com/kardianos/osext" - packages = ["."] - revision = "ae77be60afb1dcacde03767a8c37337fad28ac14" - -[[projects]] - branch = "master" - name = "github.com/kisielk/sqlstruct" - packages = ["."] - revision = "648daed35d49dac24a4bff253b190a80da3ab6a5" - -[[projects]] - name = "github.com/kisom/goutils" - packages = ["assert"] - revision = "d6c5360a068641fc799295411f429be80115bcfc" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/lib/pq" - packages = [ - ".", - "oid" - ] - revision = "88edab0803230a3898347e77b474f8c1820a1f20" - -[[projects]] - name = "github.com/mattn/go-sqlite3" - packages = ["."] - revision = "6c771bb9887719704b210e87e934f08be014bdb1" - version = "v1.6.0" - -[[projects]] - name = "github.com/pkg/errors" - packages = ["."] - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = [ - "cryptobyte", - "cryptobyte/asn1", - "ed25519", - "ed25519/internal/edwards25519", - "ocsp", - "pbkdf2", - "pkcs12", - "pkcs12/internal/rc2", - "scrypt" - ] - revision = "c126467f60eb25f8f27e5a981f32a87e3965053f" - -[[projects]] - branch = "master" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp" - ] - revision = "f5dfe339be1d06f81b22525fe34671ee7d2c8904" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "eb3713a13a2a3e0a35c010aed983787299798de5f20ba838399802f9ae67107c" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/cloudflare/cfssl/Gopkg.toml b/vendor/github.com/cloudflare/cfssl/Gopkg.toml deleted file mode 100644 index ce25e37c5f..0000000000 --- a/vendor/github.com/cloudflare/cfssl/Gopkg.toml +++ /dev/null @@ -1,86 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - branch = "master" - name = "github.com/GeertJohan/go.rice" - -[[constraint]] - branch = "master" - name = "github.com/cloudflare/backoff" - -[[constraint]] - branch = "master" - name = "github.com/cloudflare/go-metrics" - -[[constraint]] - branch = "master" - name = "github.com/cloudflare/redoctober" - -[[constraint]] - name = "github.com/go-sql-driver/mysql" - version = "1.3.0" - -[[constraint]] - name = "github.com/google/certificate-transparency-go" - revision = "5ab67e519c93568ac3ee50fd6772a5bcf8aa460d" - -[[constraint]] - name = "github.com/jmhodges/clock" - version = "1.1.0" - -[[constraint]] - branch = "master" - name = "github.com/jmoiron/sqlx" - -[[constraint]] - branch = "master" - name = "github.com/kisielk/sqlstruct" - -[[constraint]] - name = "github.com/kisom/goutils" - version = "1.1.0" - -[[constraint]] - branch = "master" - name = "github.com/lib/pq" - -[[constraint]] - name = "github.com/mattn/go-sqlite3" - version = "1.6.0" - -[[constraint]] - branch = "master" - name = "golang.org/x/crypto" - -[[constraint]] - branch = "master" - name = "golang.org/x/net" - -[prune] - go-tests = true - unused-packages = true diff --git a/vendor/github.com/cloudflare/cfssl/README.md b/vendor/github.com/cloudflare/cfssl/README.md deleted file mode 100644 index 8fc4013a08..0000000000 --- a/vendor/github.com/cloudflare/cfssl/README.md +++ /dev/null @@ -1,390 +0,0 @@ -# CFSSL - -[![Build Status](https://travis-ci.org/cloudflare/cfssl.svg?branch=master)](https://travis-ci.org/cloudflare/cfssl) -[![Coverage Status](http://codecov.io/github/cloudflare/cfssl/coverage.svg?branch=master)](http://codecov.io/github/cloudflare/cfssl?branch=master) -[![GoDoc](https://godoc.org/github.com/cloudflare/cfssl?status.svg)](https://godoc.org/github.com/cloudflare/cfssl) - -## CloudFlare's PKI/TLS toolkit - -CFSSL is CloudFlare's PKI/TLS swiss army knife. It is both a command line -tool and an HTTP API server for signing, verifying, and bundling TLS -certificates. It requires Go 1.8+ to build. - -Note that certain linux distributions have certain algorithms removed -(RHEL-based distributions in particular), so the golang from the -official repositories will not work. Users of these distributions should -[install go manually](//golang.org/dl) to install CFSSL. - -CFSSL consists of: - -* a set of packages useful for building custom TLS PKI tools -* the `cfssl` program, which is the canonical command line utility - using the CFSSL packages. -* the `multirootca` program, which is a certificate authority server - that can use multiple signing keys. -* the `mkbundle` program is used to build certificate pool bundles. -* the `cfssljson` program, which takes the JSON output from the - `cfssl` and `multirootca` programs and writes certificates, keys, - CSRs, and bundles to disk. - -### Building - -See [BUILDING](BUILDING.md) - -### Installation - -Installation requires a -[working Go 1.8+ installation](http://golang.org/doc/install) and a -properly set `GOPATH`. - -``` -$ go get -u github.com/cloudflare/cfssl/cmd/cfssl -``` - -will download and build the CFSSL tool, installing it in -`$GOPATH/bin/cfssl`. - -To install any of the other utility programs that are -in this repo (for instance `cfssljson` in this case): - -``` -$ go get -u github.com/cloudflare/cfssl/cmd/cfssljson -``` - -This will download and build the CFSSLJSON tool, installing it in -`$GOPATH/bin/`. - -And to simply install __all__ of the programs in this repo: - -``` -$ go get -u github.com/cloudflare/cfssl/cmd/... -``` - -This will download, build, and install all of the utility programs -(including `cfssl`, `cfssljson`, and `mkbundle` among others) into the -`$GOPATH/bin/` directory. - -### Using the Command Line Tool - -The `cfssl` command line tool takes a command to specify what -operation it should carry out: - - sign signs a certificate - bundle build a certificate bundle - genkey generate a private key and a certificate request - gencert generate a private key and a certificate - serve start the API server - version prints out the current version - selfsign generates a self-signed certificate - print-defaults print default configurations - -Use `cfssl [command] -help` to find out more about a command. -The `version` command takes no arguments. - -#### Signing - -``` -cfssl sign [-ca cert] [-ca-key key] [-hostname comma,separated,hostnames] csr [subject] -``` - -The `csr` is the client's certificate request. The `-ca` and `-ca-key` -flags are the CA's certificate and private key, respectively. By -default, they are `ca.pem` and `ca_key.pem`. The `-hostname` is -a comma separated hostname list that overrides the DNS names and -IP address in the certificate SAN extension. -For example, assuming the CA's private key is in -`/etc/ssl/private/cfssl_key.pem` and the CA's certificate is in -`/etc/ssl/certs/cfssl.pem`, to sign the `cloudflare.pem` certificate -for cloudflare.com: - -``` -cfssl sign -ca /etc/ssl/certs/cfssl.pem \ - -ca-key /etc/ssl/private/cfssl_key.pem \ - -hostname cloudflare.com \ - ./cloudflare.pem -``` - -It is also possible to specify CSR with the `-csr` flag. By doing so, -flag values take precedence and will overwrite the argument. - -The subject is an optional file that contains subject information that -should be used in place of the information from the CSR. It should be -a JSON file as follows: - -```json -{ - "CN": "example.com", - "names": [ - { - "C": "US", - "L": "San Francisco", - "O": "Internet Widgets, Inc.", - "OU": "WWW", - "ST": "California" - } - ] -} -``` - -**N.B.** As of Go 1.7, self-signed certificates will not include -[the AKI](https://go.googlesource.com/go/+/b623b71509b2d24df915d5bc68602e1c6edf38ca). - -#### Bundling - -``` -cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \ - [-metadata metadata_file] [-flavor bundle_flavor] \ - -cert certificate_file [-key key_file] -``` - -The bundles are used for the root and intermediate certificate -pools. In addition, platform metadata is specified through `-metadata`. -The bundle files, metadata file (and auxiliary files) can be -found at: - - https://github.com/cloudflare/cfssl_trust - -Specify PEM-encoded client certificate and key through `-cert` and -`-key` respectively. If key is specified, the bundle will be built -and verified with the key. Otherwise the bundle will be built -without a private key. Instead of file path, use `-` for reading -certificate PEM from stdin. It is also acceptable that the certificate -file should contain a (partial) certificate bundle. - -Specify bundling flavor through `-flavor`. There are three flavors: -`optimal` to generate a bundle of shortest chain and most advanced -cryptographic algorithms, `ubiquitous` to generate a bundle of most -widely acceptance across different browsers and OS platforms, and -`force` to find an acceptable bundle which is identical to the -content of the input certificate file. - -Alternatively, the client certificate can be pulled directly from -a domain. It is also possible to connect to the remote address -through `-ip`. - -``` -cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \ - [-metadata metadata_file] [-flavor bundle_flavor] \ - -domain domain_name [-ip ip_address] -``` - -The bundle output form should follow the example: - -```json -{ - "bundle": "CERT_BUNDLE_IN_PEM", - "crt": "LEAF_CERT_IN_PEM", - "crl_support": true, - "expires": "2015-12-31T23:59:59Z", - "hostnames": ["example.com"], - "issuer": "ISSUER CERT SUBJECT", - "key": "KEY_IN_PEM", - "key_size": 2048, - "key_type": "2048-bit RSA", - "ocsp": ["http://ocsp.example-ca.com"], - "ocsp_support": true, - "root": "ROOT_CA_CERT_IN_PEM", - "signature": "SHA1WithRSA", - "subject": "LEAF CERT SUBJECT", - "status": { - "rebundled": false, - "expiring_SKIs": [], - "untrusted_root_stores": [], - "messages": [], - "code": 0 - } -} -``` - - -#### Generating certificate signing request and private key - -``` -cfssl genkey csr.json -``` - -To generate a private key and corresponding certificate request, specify -the key request as a JSON file. This file should follow the form: - -```json -{ - "hosts": [ - "example.com", - "www.example.com" - ], - "key": { - "algo": "rsa", - "size": 2048 - }, - "names": [ - { - "C": "US", - "L": "San Francisco", - "O": "Internet Widgets, Inc.", - "OU": "WWW", - "ST": "California" - } - ] -} -``` - -#### Generating self-signed root CA certificate and private key - -``` -cfssl genkey -initca csr.json | cfssljson -bare ca -``` - -To generate a self-signed root CA certificate, specify the key request as -a JSON file in the same format as in 'genkey'. Three PEM-encoded entities -will appear in the output: the private key, the csr, and the self-signed -certificate. - -#### Generating a remote-issued certificate and private key. - -``` -cfssl gencert -remote=remote_server [-hostname=comma,separated,hostnames] csr.json -``` - -This calls `genkey` but has a remote CFSSL server sign and issue -the certificate. You may use `-hostname` to override certificate SANs. - -#### Generating a local-issued certificate and private key. - -``` -cfssl gencert -ca cert -ca-key key [-hostname=comma,separated,hostnames] csr.json -``` - -This generates and issues a certificate and private key from a local CA -via a JSON request. You may use `-hostname` to override certificate SANs. - - -#### Updating an OCSP responses file with a newly issued certificate - -``` -cfssl ocspsign -ca cert -responder key -responder-key key -cert cert \ - | cfssljson -bare -stdout >> responses -``` - -This will generate an OCSP response for the `cert` and add it to the -`responses` file. You can then pass `responses` to `ocspserve` to start an -OCSP server. - -### Starting the API Server - -CFSSL comes with an HTTP-based API server; the endpoints are -documented in `doc/api/intro.txt`. The server is started with the `serve` -command: - -``` -cfssl serve [-address address] [-ca cert] [-ca-bundle bundle] \ - [-ca-key key] [-int-bundle bundle] [-int-dir dir] [-port port] \ - [-metadata file] [-remote remote_host] [-config config] \ - [-responder cert] [-responder-key key] [-db-config db-config] -``` - -Address and port default to "127.0.0.1:8888". The `-ca` and `-ca-key` -arguments should be the PEM-encoded certificate and private key to use -for signing; by default, they are `ca.pem` and `ca_key.pem`. The -`-ca-bundle` and `-int-bundle` should be the certificate bundles used -for the root and intermediate certificate pools, respectively. These -default to `ca-bundle.crt` and `int-bundle.crt` respectively. If the -`-remote` option is specified, all signature operations will be forwarded -to the remote CFSSL. - -`-int-dir` specifies an intermediates directory. `-metadata` is a file for -root certificate presence. The content of the file is a json dictionary -(k,v) such that each key k is an SHA-1 digest of a root certificate while value v -is a list of key store filenames. `-config` specifies a path to a configuration -file. `-responder` and `-responder-key` are the certificate and the -private key for the OCSP responder, respectively. - -The amount of logging can be controlled with the `-loglevel` option. This -comes *after* the serve command: - -``` -cfssl serve -loglevel 2 -``` - -The levels are: - -* 0 - DEBUG -* 1 - INFO (this is the default level) -* 2 - WARNING -* 3 - ERROR -* 4 - CRITICAL - -### The multirootca - -The `cfssl` program can act as an online certificate authority, but it -only uses a single key. If multiple signing keys are needed, the -`multirootca` program can be used. It only provides the `sign`, -`authsign` and `info` endpoints. The documentation contains instructions -for configuring and running the CA. - -### The mkbundle Utility - -`mkbundle` is used to build the root and intermediate bundles used in -verifying certificates. It can be installed with - -``` -go get -u github.com/cloudflare/cfssl/cmd/mkbundle -``` - -It takes a collection of certificates, checks for CRL revocation (OCSP -support is planned for the next release) and expired certificates, and -bundles them into one file. It takes directories of certificates and -certificate files (which may contain multiple certificates). For example, -if the directory `intermediates` contains a number of intermediate -certificates: - -``` -mkbundle -f int-bundle.crt intermediates -``` - -will check those certificates and combine valid certificates into a single -`int-bundle.crt` file. - -The `-f` flag specifies an output name; `-loglevel` specifies the verbosity -of the logging (using the same loglevels as above), and `-nw` controls the -number of revocation-checking workers. - -### The cfssljson Utility - -Most of the output from `cfssl` is in JSON. The `cfssljson` utility can take -this output and split it out into separate `key`, `certificate`, `CSR`, and -`bundle` files as appropriate. The tool takes a single flag, `-f`, that -specifies the input file, and an argument that specifies the base name for -the files produced. If the input filename is `-` (which is the default), -cfssljson reads from standard input. It maps keys in the JSON file to -filenames in the following way: - -* if __cert__ or __certificate__ is specified, __basename.pem__ will be produced. -* if __key__ or __private_key__ is specified, __basename-key.pem__ will be produced. -* if __csr__ or __certificate_request__ is specified, __basename.csr__ will be produced. -* if __bundle__ is specified, __basename-bundle.pem__ will be produced. -* if __ocspResponse__ is specified, __basename-response.der__ will be produced. - -Instead of saving to a file, you can pass `-stdout` to output the encoded -contents to standard output. - -### Static Builds - -By default, the web assets are accessed from disk, based on their -relative locations. If you wish to distribute a single, -statically-linked, `cfssl` binary, you’ll want to embed these resources -before building. This can by done with the -[go.rice](https://github.com/GeertJohan/go.rice) tool. - -``` -pushd cli/serve && rice embed-go && popd -``` - -Then building with `go build` will use the embedded resources. - -### Additional Documentation - -Additional documentation can be found in the "doc" directory: - -* `api/intro.txt`: documents the API endpoints -* `bootstrap.txt`: a walkthrough from building the package to getting - up and running diff --git a/vendor/github.com/cloudflare/cfssl/test.sh b/vendor/github.com/cloudflare/cfssl/test.sh deleted file mode 100755 index 7c944e4391..0000000000 --- a/vendor/github.com/cloudflare/cfssl/test.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -set -o errexit - -CDIR=$(cd `dirname "$0"` && pwd) -cd "$CDIR" - -ORG_PATH="github.com/cloudflare" -REPO_PATH="${ORG_PATH}/cfssl" -ARCH="$(uname -m)" - -export GOPATH="${CDIR}/gopath" - -export PATH="${PATH}:${GOPATH}/bin" - -eval $(go env) - -if [ ! -h gopath/src/${REPO_PATH} ]; then - mkdir -p gopath/src/${ORG_PATH} - ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 -fi - -ls "${GOPATH}/src/${REPO_PATH}" - -PACKAGES="" -if [ "$#" != 0 ]; then - for pkg in "$@"; do - PACKAGES="$PACKAGES $REPO_PATH/$pkg" - done -else - PACKAGES=$(go list ./... | grep -v /vendor/ | grep ^_) - # Escape current cirectory - CDIR_ESC=$(printf "%q" "$CDIR/") - # Remove current directory from the package path - PACKAGES=${PACKAGES//$CDIR_ESC/} - # Remove underscores - PACKAGES=${PACKAGES//_/} - # split PACKAGES into an array and prepend REPO_PATH to each local package - split=(${PACKAGES// / }) - PACKAGES=${split[@]/#/${REPO_PATH}/} -fi - -# Build and install cfssl executable in PATH -go install -tags "$BUILD_TAGS" ${REPO_PATH}/cmd/cfssl - -COVPROFILES="" -for package in $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' $PACKAGES) -do - profile="$GOPATH/src/$package/.coverprofile" - if [ $ARCH = 'x86_64' ]; then - go test -race -tags "$BUILD_TAGS" --coverprofile=$profile $package - else - go test -tags "$BUILD_TAGS" --coverprofile=$profile $package - fi - [ -s $profile ] && COVPROFILES="$COVPROFILES $profile" -done -cat $COVPROFILES > coverprofile.txt - -if ! command -v fgt > /dev/null ; then - go get github.com/GeertJohan/fgt -fi - -if ! command -v golint > /dev/null ; then - go get github.com/golang/lint/golint -fi - -for package in $PACKAGES -do - echo "fgt golint ${package}" - fgt golint "${package}" -done diff --git a/vendor/github.com/container-storage-interface/spec/.gitignore b/vendor/github.com/container-storage-interface/spec/.gitignore deleted file mode 100644 index 443a2c83dc..0000000000 --- a/vendor/github.com/container-storage-interface/spec/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.tmp -.DS_Store -.build -*.swp diff --git a/vendor/github.com/container-storage-interface/spec/.travis.yml b/vendor/github.com/container-storage-interface/spec/.travis.yml deleted file mode 100644 index 65d1a6ab0a..0000000000 --- a/vendor/github.com/container-storage-interface/spec/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Setting "sudo" to false forces Travis-CI to use its -# container-based build infrastructure, which has shorter -# queue times. -sudo: false - -# Use the newer Travis-CI build templates based on the -# Debian Linux distribution "Trusty" release. -dist: trusty - -# Selecting C as the language keeps the container to a -# minimum footprint. -language: c - -jobs: - include: - - # The test stage validates that the protobuf file was updated - # correctly prior to being committed. - - stage: test - script: make - - # The lang stages validate the specification using - # language-specific bindings. - - # Lang stage: Cxx - - stage: lang - script: make -C lib/cxx - - # Lang stage: Go - - stage: lang - language: go - go: 1.10.4 - go_import_path: github.com/container-storage-interface/spec - install: - - make -C lib/go protoc - - make -C lib/go protoc-gen-go - script: - - make -C lib/go diff --git a/vendor/github.com/container-storage-interface/spec/CCLA.pdf b/vendor/github.com/container-storage-interface/spec/CCLA.pdf deleted file mode 100644 index 08a9f2a50d..0000000000 Binary files a/vendor/github.com/container-storage-interface/spec/CCLA.pdf and /dev/null differ diff --git a/vendor/github.com/container-storage-interface/spec/CONTRIBUTING.md b/vendor/github.com/container-storage-interface/spec/CONTRIBUTING.md deleted file mode 100644 index fd1ac842e3..0000000000 --- a/vendor/github.com/container-storage-interface/spec/CONTRIBUTING.md +++ /dev/null @@ -1,59 +0,0 @@ -# How to Contribute - -This document outlines some of the requirements and conventions for contributing to the Container Storage Interface, including development workflow, commit message formatting, contact points, and other resources to make it easier to get your contribution accepted. - -## Licence and CLA - -CSI is under [Apache 2.0](LICENSE) and accepts contributions via GitHub pull requests. - -Before contributing to the Container Storage Interface, contributors MUST sign the CLA available [here](https://github.com/container-storage-interface/spec/blob/master/CCLA.pdf). -The CLA MAY be signed on behalf of a company, possibly covering multiple contributors, or as an individual (put "Individual" for "Corporation name"). -The completed CLA MUST be mailed to the CSI Approvers [mailing list](container-storage-interface-approvers@googlegroups.com). - -## Markdown style - -To keep consistency throughout the Markdown files in the CSI spec, all files should be formatted one sentence per line. -This fixes two things: it makes diffing easier with git and it resolves fights about line wrapping length. -For example, this paragraph will span three lines in the Markdown source. - -## Code style - -This also applies to the code snippets in the markdown files. - -* Please wrap the code at 72 characters. - -## Comments - -This also applies to the code snippets in the markdown files. - -* End each sentence within a comment with a punctuation mark (please note that we generally prefer periods); this applies to incomplete sentences as well. -* For trailing comments, leave one space between the end of the code and the beginning of the comment. - -## Git commit - -The "system of record" for the specification is the `spec.md` file and all hand-edits of the specification should happen there. -**DO NOT** manually edit the generated protobufs or generated language bindings. -Once changes to `spec.md` are complete, please run `make` to update generated files. - -**IMPORTANT:** Prior to committing code please run `make` to ensure that your specification changes have landed in all generated files. - -### Commit Style - -Each commit should represent a single logical (atomic) change: this makes your changes easier to review. - -* Try to avoid unrelated cleanups (e.g., typo fixes or style nits) in the same commit that makes functional changes. - While typo fixes are great, including them in the same commit as functional changes makes the commit history harder to read. -* Developers often make incremental commits to save their progress when working on a change, and then “rewrite history” (e.g., using `git rebase -i`) to create a clean set of commits once the change is ready to be reviewed. - -Simple house-keeping for clean git history. -Read more on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/) or the Discussion section of [`git-commit(1)`](http://git-scm.com/docs/git-commit). - -* Separate the subject from body with a blank line. -* Limit the subject line to 50 characters. -* Capitalize the subject line. -* Do not end the subject line with a period. -* Use the imperative mood in the subject line. -* Wrap the body at 72 characters. -* Use the body to explain what and why vs. how. - * If there was important/useful/essential conversation or information, copy or include a reference. -* When possible, one keyword to scope the change in the subject (i.e. "README: ...", "tool: ..."). diff --git a/vendor/github.com/container-storage-interface/spec/Makefile b/vendor/github.com/container-storage-interface/spec/Makefile deleted file mode 100644 index 0e04e322b8..0000000000 --- a/vendor/github.com/container-storage-interface/spec/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -all: build - -CSI_SPEC := spec.md -CSI_PROTO := csi.proto - -# This is the target for building the temporary CSI protobuf file. -# -# The temporary file is not versioned, and thus will always be -# built on Travis-CI. -$(CSI_PROTO).tmp: $(CSI_SPEC) Makefile - echo "// Code generated by make; DO NOT EDIT." > "$@" - cat $< | sed -n -e '/```protobuf$$/,/^```$$/ p' | sed '/^```/d' >> "$@" - -# This is the target for building the CSI protobuf file. -# -# This target depends on its temp file, which is not versioned. -# Therefore when built on Travis-CI the temp file will always -# be built and trigger this target. On Travis-CI the temp file -# is compared with the real file, and if they differ the build -# will fail. -# -# Locally the temp file is simply copied over the real file. -$(CSI_PROTO): $(CSI_PROTO).tmp -ifeq (true,$(TRAVIS)) - diff "$@" "$?" -else - diff "$@" "$?" > /dev/null 2>&1 || cp -f "$?" "$@" -endif - -build: check - -# If this is not running on Travis-CI then for sake of convenience -# go ahead and update the language bindings as well. -ifneq (true,$(TRAVIS)) -build: - $(MAKE) -C lib/go - $(MAKE) -C lib/cxx -endif - -clean: - $(MAKE) -C lib/go $@ - -clobber: clean - $(MAKE) -C lib/go $@ - rm -f $(CSI_PROTO) $(CSI_PROTO).tmp - -# check generated files for violation of standards -check: $(CSI_PROTO) - awk '{ if (length > 72) print NR, $$0 }' $? | diff - /dev/null - -.PHONY: clean clobber check diff --git a/vendor/github.com/container-storage-interface/spec/OWNERS b/vendor/github.com/container-storage-interface/spec/OWNERS deleted file mode 100644 index 7225bd014c..0000000000 --- a/vendor/github.com/container-storage-interface/spec/OWNERS +++ /dev/null @@ -1,10 +0,0 @@ -approvers: - - saad-ali # Representing Kubernetes - - thockin # Representing Kubernetes - - jieyu # Representing Mesos - - jdef # Representing Mesos - - anusha-ragunathan # Representing Docker - - ddebroy # Representing Docker - - julian-hj # Representing Cloud Foundry - - paulcwarren # Representing Cloud Foundry -reviewers: diff --git a/vendor/github.com/container-storage-interface/spec/README.md b/vendor/github.com/container-storage-interface/spec/README.md deleted file mode 100644 index c686e423f7..0000000000 --- a/vendor/github.com/container-storage-interface/spec/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Container Storage Interface (CSI) Specification [![build status](https://travis-ci.org/container-storage-interface/spec.svg?branch=master)](https://travis-ci.org/container-storage-interface/spec) - -![CSI Logo](logo.png) - -This project contains the CSI [specification](spec.md) and [protobuf](csi.proto) files. - -## CSI Adoption - -### Container Orchestrators (CO) - -* [Cloud Foundry](https://github.com/cloudfoundry/csi-plugins-release/blob/master/CSI_SUPPORT.md) -* [Kubernetes](https://kubernetes-csi.github.io/docs/) -* [Mesos](http://mesos.apache.org/documentation/latest/csi/) diff --git a/vendor/github.com/container-storage-interface/spec/VERSION b/vendor/github.com/container-storage-interface/spec/VERSION deleted file mode 100644 index 9084fa2f71..0000000000 --- a/vendor/github.com/container-storage-interface/spec/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.1.0 diff --git a/vendor/github.com/container-storage-interface/spec/csi.proto b/vendor/github.com/container-storage-interface/spec/csi.proto deleted file mode 100644 index 4c4d225bf5..0000000000 --- a/vendor/github.com/container-storage-interface/spec/csi.proto +++ /dev/null @@ -1,1306 +0,0 @@ -// Code generated by make; DO NOT EDIT. -syntax = "proto3"; -package csi.v1; - -import "google/protobuf/descriptor.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option go_package = "csi"; - -extend google.protobuf.FieldOptions { - // Indicates that a field MAY contain information that is sensitive - // and MUST be treated as such (e.g. not logged). - bool csi_secret = 1059; -} -service Identity { - rpc GetPluginInfo(GetPluginInfoRequest) - returns (GetPluginInfoResponse) {} - - rpc GetPluginCapabilities(GetPluginCapabilitiesRequest) - returns (GetPluginCapabilitiesResponse) {} - - rpc Probe (ProbeRequest) - returns (ProbeResponse) {} -} - -service Controller { - rpc CreateVolume (CreateVolumeRequest) - returns (CreateVolumeResponse) {} - - rpc DeleteVolume (DeleteVolumeRequest) - returns (DeleteVolumeResponse) {} - - rpc ControllerPublishVolume (ControllerPublishVolumeRequest) - returns (ControllerPublishVolumeResponse) {} - - rpc ControllerUnpublishVolume (ControllerUnpublishVolumeRequest) - returns (ControllerUnpublishVolumeResponse) {} - - rpc ValidateVolumeCapabilities (ValidateVolumeCapabilitiesRequest) - returns (ValidateVolumeCapabilitiesResponse) {} - - rpc ListVolumes (ListVolumesRequest) - returns (ListVolumesResponse) {} - - rpc GetCapacity (GetCapacityRequest) - returns (GetCapacityResponse) {} - - rpc ControllerGetCapabilities (ControllerGetCapabilitiesRequest) - returns (ControllerGetCapabilitiesResponse) {} - - rpc CreateSnapshot (CreateSnapshotRequest) - returns (CreateSnapshotResponse) {} - - rpc DeleteSnapshot (DeleteSnapshotRequest) - returns (DeleteSnapshotResponse) {} - - rpc ListSnapshots (ListSnapshotsRequest) - returns (ListSnapshotsResponse) {} - - rpc ControllerExpandVolume (ControllerExpandVolumeRequest) - returns (ControllerExpandVolumeResponse) {} -} - -service Node { - rpc NodeStageVolume (NodeStageVolumeRequest) - returns (NodeStageVolumeResponse) {} - - rpc NodeUnstageVolume (NodeUnstageVolumeRequest) - returns (NodeUnstageVolumeResponse) {} - - rpc NodePublishVolume (NodePublishVolumeRequest) - returns (NodePublishVolumeResponse) {} - - rpc NodeUnpublishVolume (NodeUnpublishVolumeRequest) - returns (NodeUnpublishVolumeResponse) {} - - rpc NodeGetVolumeStats (NodeGetVolumeStatsRequest) - returns (NodeGetVolumeStatsResponse) {} - - - rpc NodeExpandVolume(NodeExpandVolumeRequest) - returns (NodeExpandVolumeResponse) {} - - - rpc NodeGetCapabilities (NodeGetCapabilitiesRequest) - returns (NodeGetCapabilitiesResponse) {} - - rpc NodeGetInfo (NodeGetInfoRequest) - returns (NodeGetInfoResponse) {} -} -message GetPluginInfoRequest { - // Intentionally empty. -} - -message GetPluginInfoResponse { - // The name MUST follow domain name notation format - // (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD - // include the plugin's host company name and the plugin name, - // to minimize the possibility of collisions. It MUST be 63 - // characters or less, beginning and ending with an alphanumeric - // character ([a-z0-9A-Z]) with dashes (-), dots (.), and - // alphanumerics between. This field is REQUIRED. - string name = 1; - - // This field is REQUIRED. Value of this field is opaque to the CO. - string vendor_version = 2; - - // This field is OPTIONAL. Values are opaque to the CO. - map manifest = 3; -} -message GetPluginCapabilitiesRequest { - // Intentionally empty. -} - -message GetPluginCapabilitiesResponse { - // All the capabilities that the controller service supports. This - // field is OPTIONAL. - repeated PluginCapability capabilities = 1; -} - -// Specifies a capability of the plugin. -message PluginCapability { - message Service { - enum Type { - UNKNOWN = 0; - // CONTROLLER_SERVICE indicates that the Plugin provides RPCs for - // the ControllerService. Plugins SHOULD provide this capability. - // In rare cases certain plugins MAY wish to omit the - // ControllerService entirely from their implementation, but such - // SHOULD NOT be the common case. - // The presence of this capability determines whether the CO will - // attempt to invoke the REQUIRED ControllerService RPCs, as well - // as specific RPCs as indicated by ControllerGetCapabilities. - CONTROLLER_SERVICE = 1; - - // VOLUME_ACCESSIBILITY_CONSTRAINTS indicates that the volumes for - // this plugin MAY NOT be equally accessible by all nodes in the - // cluster. The CO MUST use the topology information returned by - // CreateVolumeRequest along with the topology information - // returned by NodeGetInfo to ensure that a given volume is - // accessible from a given node when scheduling workloads. - VOLUME_ACCESSIBILITY_CONSTRAINTS = 2; - } - Type type = 1; - } - - message VolumeExpansion { - enum Type { - UNKNOWN = 0; - - // ONLINE indicates that volumes may be expanded when published to - // a node. When a Plugin implements this capability it MUST - // implement either the EXPAND_VOLUME controller capability or the - // EXPAND_VOLUME node capability or both. When a plugin supports - // ONLINE volume expansion and also has the EXPAND_VOLUME - // controller capability then the plugin MUST support expansion of - // volumes currently published and available on a node. When a - // plugin supports ONLINE volume expansion and also has the - // EXPAND_VOLUME node capability then the plugin MAY support - // expansion of node-published volume via NodeExpandVolume. - // - // Example 1: Given a shared filesystem volume (e.g. GlusterFs), - // the Plugin may set the ONLINE volume expansion capability and - // implement ControllerExpandVolume but not NodeExpandVolume. - // - // Example 2: Given a block storage volume type (e.g. EBS), the - // Plugin may set the ONLINE volume expansion capability and - // implement both ControllerExpandVolume and NodeExpandVolume. - // - // Example 3: Given a Plugin that supports volume expansion only - // upon a node, the Plugin may set the ONLINE volume - // expansion capability and implement NodeExpandVolume but not - // ControllerExpandVolume. - ONLINE = 1; - - // OFFLINE indicates that volumes currently published and - // available on a node SHALL NOT be expanded via - // ControllerExpandVolume. When a plugin supports OFFLINE volume - // expansion it MUST implement either the EXPAND_VOLUME controller - // capability or both the EXPAND_VOLUME controller capability and - // the EXPAND_VOLUME node capability. - // - // Example 1: Given a block storage volume type (e.g. Azure Disk) - // that does not support expansion of "node-attached" (i.e. - // controller-published) volumes, the Plugin may indicate - // OFFLINE volume expansion support and implement both - // ControllerExpandVolume and NodeExpandVolume. - OFFLINE = 2; - } - Type type = 1; - } - - oneof type { - // Service that the plugin supports. - Service service = 1; - VolumeExpansion volume_expansion = 2; - } -} -message ProbeRequest { - // Intentionally empty. -} - -message ProbeResponse { - // Readiness allows a plugin to report its initialization status back - // to the CO. Initialization for some plugins MAY be time consuming - // and it is important for a CO to distinguish between the following - // cases: - // - // 1) The plugin is in an unhealthy state and MAY need restarting. In - // this case a gRPC error code SHALL be returned. - // 2) The plugin is still initializing, but is otherwise perfectly - // healthy. In this case a successful response SHALL be returned - // with a readiness value of `false`. Calls to the plugin's - // Controller and/or Node services MAY fail due to an incomplete - // initialization state. - // 3) The plugin has finished initializing and is ready to service - // calls to its Controller and/or Node services. A successful - // response is returned with a readiness value of `true`. - // - // This field is OPTIONAL. If not present, the caller SHALL assume - // that the plugin is in a ready state and is accepting calls to its - // Controller and/or Node services (according to the plugin's reported - // capabilities). - .google.protobuf.BoolValue ready = 1; -} -message CreateVolumeRequest { - // The suggested name for the storage space. This field is REQUIRED. - // It serves two purposes: - // 1) Idempotency - This name is generated by the CO to achieve - // idempotency. The Plugin SHOULD ensure that multiple - // `CreateVolume` calls for the same name do not result in more - // than one piece of storage provisioned corresponding to that - // name. If a Plugin is unable to enforce idempotency, the CO's - // error recovery logic could result in multiple (unused) volumes - // being provisioned. - // In the case of error, the CO MUST handle the gRPC error codes - // per the recovery behavior defined in the "CreateVolume Errors" - // section below. - // The CO is responsible for cleaning up volumes it provisioned - // that it no longer needs. If the CO is uncertain whether a volume - // was provisioned or not when a `CreateVolume` call fails, the CO - // MAY call `CreateVolume` again, with the same name, to ensure the - // volume exists and to retrieve the volume's `volume_id` (unless - // otherwise prohibited by "CreateVolume Errors"). - // 2) Suggested name - Some storage systems allow callers to specify - // an identifier by which to refer to the newly provisioned - // storage. If a storage system supports this, it can optionally - // use this name as the identifier for the new volume. - // Any Unicode string that conforms to the length limit is allowed - // except those containing the following banned characters: - // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. - // (These are control characters other than commonly used whitespace.) - string name = 1; - - // This field is OPTIONAL. This allows the CO to specify the capacity - // requirement of the volume to be provisioned. If not specified, the - // Plugin MAY choose an implementation-defined capacity range. If - // specified it MUST always be honored, even when creating volumes - // from a source; which MAY force some backends to internally extend - // the volume after creating it. - CapacityRange capacity_range = 2; - - // The capabilities that the provisioned volume MUST have. SP MUST - // provision a volume that will satisfy ALL of the capabilities - // specified in this list. Otherwise SP MUST return the appropriate - // gRPC error code. - // The Plugin MUST assume that the CO MAY use the provisioned volume - // with ANY of the capabilities specified in this list. - // For example, a CO MAY specify two volume capabilities: one with - // access mode SINGLE_NODE_WRITER and another with access mode - // MULTI_NODE_READER_ONLY. In this case, the SP MUST verify that the - // provisioned volume can be used in either mode. - // This also enables the CO to do early validation: If ANY of the - // specified volume capabilities are not supported by the SP, the call - // MUST return the appropriate gRPC error code. - // This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 3; - - // Plugin specific parameters passed in as opaque key-value pairs. - // This field is OPTIONAL. The Plugin is responsible for parsing and - // validating these parameters. COs will treat these as opaque. - map parameters = 4; - - // Secrets required by plugin to complete volume creation request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 5 [(csi_secret) = true]; - - // If specified, the new volume will be pre-populated with data from - // this source. This field is OPTIONAL. - VolumeContentSource volume_content_source = 6; - - // Specifies where (regions, zones, racks, etc.) the provisioned - // volume MUST be accessible from. - // An SP SHALL advertise the requirements for topological - // accessibility information in documentation. COs SHALL only specify - // topological accessibility information supported by the SP. - // This field is OPTIONAL. - // This field SHALL NOT be specified unless the SP has the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. - // If this field is not specified and the SP has the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY - // choose where the provisioned volume is accessible from. - TopologyRequirement accessibility_requirements = 7; -} - -// Specifies what source the volume will be created from. One of the -// type fields MUST be specified. -message VolumeContentSource { - message SnapshotSource { - // Contains identity information for the existing source snapshot. - // This field is REQUIRED. Plugin is REQUIRED to support creating - // volume from snapshot if it supports the capability - // CREATE_DELETE_SNAPSHOT. - string snapshot_id = 1; - } - - message VolumeSource { - // Contains identity information for the existing source volume. - // This field is REQUIRED. Plugins reporting CLONE_VOLUME - // capability MUST support creating a volume from another volume. - string volume_id = 1; - } - - oneof type { - SnapshotSource snapshot = 1; - VolumeSource volume = 2; - } -} - -message CreateVolumeResponse { - // Contains all attributes of the newly created volume that are - // relevant to the CO along with information required by the Plugin - // to uniquely identify the volume. This field is REQUIRED. - Volume volume = 1; -} - -// Specify a capability of a volume. -message VolumeCapability { - // Indicate that the volume will be accessed via the block device API. - message BlockVolume { - // Intentionally empty, for now. - } - - // Indicate that the volume will be accessed via the filesystem API. - message MountVolume { - // The filesystem type. This field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string fs_type = 1; - - // The mount options that can be used for the volume. This field is - // OPTIONAL. `mount_flags` MAY contain sensitive information. - // Therefore, the CO and the Plugin MUST NOT leak this information - // to untrusted entities. The total size of this repeated field - // SHALL NOT exceed 4 KiB. - repeated string mount_flags = 2; - } - - // Specify how a volume can be accessed. - message AccessMode { - enum Mode { - UNKNOWN = 0; - - // Can only be published once as read/write on a single node, at - // any given time. - SINGLE_NODE_WRITER = 1; - - // Can only be published once as readonly on a single node, at - // any given time. - SINGLE_NODE_READER_ONLY = 2; - - // Can be published as readonly at multiple nodes simultaneously. - MULTI_NODE_READER_ONLY = 3; - - // Can be published at multiple nodes simultaneously. Only one of - // the node can be used as read/write. The rest will be readonly. - MULTI_NODE_SINGLE_WRITER = 4; - - // Can be published as read/write at multiple nodes - // simultaneously. - MULTI_NODE_MULTI_WRITER = 5; - } - - // This field is REQUIRED. - Mode mode = 1; - } - - // Specifies what API the volume will be accessed using. One of the - // following fields MUST be specified. - oneof access_type { - BlockVolume block = 1; - MountVolume mount = 2; - } - - // This is a REQUIRED field. - AccessMode access_mode = 3; -} - -// The capacity of the storage space in bytes. To specify an exact size, -// `required_bytes` and `limit_bytes` SHALL be set to the same value. At -// least one of the these fields MUST be specified. -message CapacityRange { - // Volume MUST be at least this big. This field is OPTIONAL. - // A value of 0 is equal to an unspecified field value. - // The value of this field MUST NOT be negative. - int64 required_bytes = 1; - - // Volume MUST not be bigger than this. This field is OPTIONAL. - // A value of 0 is equal to an unspecified field value. - // The value of this field MUST NOT be negative. - int64 limit_bytes = 2; -} - -// Information about a specific volume. -message Volume { - // The capacity of the volume in bytes. This field is OPTIONAL. If not - // set (value of 0), it indicates that the capacity of the volume is - // unknown (e.g., NFS share). - // The value of this field MUST NOT be negative. - int64 capacity_bytes = 1; - - // The identifier for this volume, generated by the plugin. - // This field is REQUIRED. - // This field MUST contain enough information to uniquely identify - // this specific volume vs all other volumes supported by this plugin. - // This field SHALL be used by the CO in subsequent calls to refer to - // this volume. - // The SP is NOT responsible for global uniqueness of volume_id across - // multiple SPs. - string volume_id = 2; - - // Opaque static properties of the volume. SP MAY use this field to - // ensure subsequent volume validation and publishing calls have - // contextual information. - // The contents of this field SHALL be opaque to a CO. - // The contents of this field SHALL NOT be mutable. - // The contents of this field SHALL be safe for the CO to cache. - // The contents of this field SHOULD NOT contain sensitive - // information. - // The contents of this field SHOULD NOT be used for uniquely - // identifying a volume. The `volume_id` alone SHOULD be sufficient to - // identify the volume. - // A volume uniquely identified by `volume_id` SHALL always report the - // same volume_context. - // This field is OPTIONAL and when present MUST be passed to volume - // validation and publishing calls. - map volume_context = 3; - - // If specified, indicates that the volume is not empty and is - // pre-populated with data from the specified source. - // This field is OPTIONAL. - VolumeContentSource content_source = 4; - - // Specifies where (regions, zones, racks, etc.) the provisioned - // volume is accessible from. - // A plugin that returns this field MUST also set the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. - // An SP MAY specify multiple topologies to indicate the volume is - // accessible from multiple locations. - // COs MAY use this information along with the topology information - // returned by NodeGetInfo to ensure that a given volume is accessible - // from a given node when scheduling workloads. - // This field is OPTIONAL. If it is not specified, the CO MAY assume - // the volume is equally accessible from all nodes in the cluster and - // MAY schedule workloads referencing the volume on any available - // node. - // - // Example 1: - // accessible_topology = {"region": "R1", "zone": "Z2"} - // Indicates a volume accessible only from the "region" "R1" and the - // "zone" "Z2". - // - // Example 2: - // accessible_topology = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"} - // Indicates a volume accessible from both "zone" "Z2" and "zone" "Z3" - // in the "region" "R1". - repeated Topology accessible_topology = 5; -} - -message TopologyRequirement { - // Specifies the list of topologies the provisioned volume MUST be - // accessible from. - // This field is OPTIONAL. If TopologyRequirement is specified either - // requisite or preferred or both MUST be specified. - // - // If requisite is specified, the provisioned volume MUST be - // accessible from at least one of the requisite topologies. - // - // Given - // x = number of topologies provisioned volume is accessible from - // n = number of requisite topologies - // The CO MUST ensure n >= 1. The SP MUST ensure x >= 1 - // If x==n, then the SP MUST make the provisioned volume available to - // all topologies from the list of requisite topologies. If it is - // unable to do so, the SP MUST fail the CreateVolume call. - // For example, if a volume should be accessible from a single zone, - // and requisite = - // {"region": "R1", "zone": "Z2"} - // then the provisioned volume MUST be accessible from the "region" - // "R1" and the "zone" "Z2". - // Similarly, if a volume should be accessible from two zones, and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"} - // then the provisioned volume MUST be accessible from the "region" - // "R1" and both "zone" "Z2" and "zone" "Z3". - // - // If xn, then the SP MUST make the provisioned volume available from - // all topologies from the list of requisite topologies and MAY choose - // the remaining x-n unique topologies from the list of all possible - // topologies. If it is unable to do so, the SP MUST fail the - // CreateVolume call. - // For example, if a volume should be accessible from two zones, and - // requisite = - // {"region": "R1", "zone": "Z2"} - // then the provisioned volume MUST be accessible from the "region" - // "R1" and the "zone" "Z2" and the SP may select the second zone - // independently, e.g. "R1/Z4". - repeated Topology requisite = 1; - - // Specifies the list of topologies the CO would prefer the volume to - // be provisioned in. - // - // This field is OPTIONAL. If TopologyRequirement is specified either - // requisite or preferred or both MUST be specified. - // - // An SP MUST attempt to make the provisioned volume available using - // the preferred topologies in order from first to last. - // - // If requisite is specified, all topologies in preferred list MUST - // also be present in the list of requisite topologies. - // - // If the SP is unable to to make the provisioned volume available - // from any of the preferred topologies, the SP MAY choose a topology - // from the list of requisite topologies. - // If the list of requisite topologies is not specified, then the SP - // MAY choose from the list of all possible topologies. - // If the list of requisite topologies is specified and the SP is - // unable to to make the provisioned volume available from any of the - // requisite topologies it MUST fail the CreateVolume call. - // - // Example 1: - // Given a volume should be accessible from a single zone, and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"} - // preferred = - // {"region": "R1", "zone": "Z3"} - // then the the SP SHOULD first attempt to make the provisioned volume - // available from "zone" "Z3" in the "region" "R1" and fall back to - // "zone" "Z2" in the "region" "R1" if that is not possible. - // - // Example 2: - // Given a volume should be accessible from a single zone, and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"}, - // {"region": "R1", "zone": "Z4"}, - // {"region": "R1", "zone": "Z5"} - // preferred = - // {"region": "R1", "zone": "Z4"}, - // {"region": "R1", "zone": "Z2"} - // then the the SP SHOULD first attempt to make the provisioned volume - // accessible from "zone" "Z4" in the "region" "R1" and fall back to - // "zone" "Z2" in the "region" "R1" if that is not possible. If that - // is not possible, the SP may choose between either the "zone" - // "Z3" or "Z5" in the "region" "R1". - // - // Example 3: - // Given a volume should be accessible from TWO zones (because an - // opaque parameter in CreateVolumeRequest, for example, specifies - // the volume is accessible from two zones, aka synchronously - // replicated), and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"}, - // {"region": "R1", "zone": "Z4"}, - // {"region": "R1", "zone": "Z5"} - // preferred = - // {"region": "R1", "zone": "Z5"}, - // {"region": "R1", "zone": "Z3"} - // then the the SP SHOULD first attempt to make the provisioned volume - // accessible from the combination of the two "zones" "Z5" and "Z3" in - // the "region" "R1". If that's not possible, it should fall back to - // a combination of "Z5" and other possibilities from the list of - // requisite. If that's not possible, it should fall back to a - // combination of "Z3" and other possibilities from the list of - // requisite. If that's not possible, it should fall back to a - // combination of other possibilities from the list of requisite. - repeated Topology preferred = 2; -} - -// Topology is a map of topological domains to topological segments. -// A topological domain is a sub-division of a cluster, like "region", -// "zone", "rack", etc. -// A topological segment is a specific instance of a topological domain, -// like "zone3", "rack3", etc. -// For example {"com.company/zone": "Z1", "com.company/rack": "R3"} -// Valid keys have two segments: an OPTIONAL prefix and name, separated -// by a slash (/), for example: "com.company.example/zone". -// The key name segment is REQUIRED. The prefix is OPTIONAL. -// The key name MUST be 63 characters or less, begin and end with an -// alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-), -// underscores (_), dots (.), or alphanumerics in between, for example -// "zone". -// The key prefix MUST be 63 characters or less, begin and end with a -// lower-case alphanumeric character ([a-z0-9]), contain only -// dashes (-), dots (.), or lower-case alphanumerics in between, and -// follow domain name notation format -// (https://tools.ietf.org/html/rfc1035#section-2.3.1). -// The key prefix SHOULD include the plugin's host company name and/or -// the plugin name, to minimize the possibility of collisions with keys -// from other plugins. -// If a key prefix is specified, it MUST be identical across all -// topology keys returned by the SP (across all RPCs). -// Keys MUST be case-insensitive. Meaning the keys "Zone" and "zone" -// MUST not both exist. -// Each value (topological segment) MUST contain 1 or more strings. -// Each string MUST be 63 characters or less and begin and end with an -// alphanumeric character with '-', '_', '.', or alphanumerics in -// between. -message Topology { - map segments = 1; -} -message DeleteVolumeRequest { - // The ID of the volume to be deprovisioned. - // This field is REQUIRED. - string volume_id = 1; - - // Secrets required by plugin to complete volume deletion request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 2 [(csi_secret) = true]; -} - -message DeleteVolumeResponse { - // Intentionally empty. -} -message ControllerPublishVolumeRequest { - // The ID of the volume to be used on a node. - // This field is REQUIRED. - string volume_id = 1; - - // The ID of the node. This field is REQUIRED. The CO SHALL set this - // field to match the node ID returned by `NodeGetInfo`. - string node_id = 2; - - // Volume capability describing how the CO intends to use this volume. - // SP MUST ensure the CO can use the published volume as described. - // Otherwise SP MUST return the appropriate gRPC error code. - // This is a REQUIRED field. - VolumeCapability volume_capability = 3; - - // Indicates SP MUST publish the volume in readonly mode. - // CO MUST set this field to false if SP does not have the - // PUBLISH_READONLY controller capability. - // This is a REQUIRED field. - bool readonly = 4; - - // Secrets required by plugin to complete controller publish volume - // request. This field is OPTIONAL. Refer to the - // `Secrets Requirements` section on how to use this field. - map secrets = 5 [(csi_secret) = true]; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 6; -} - -message ControllerPublishVolumeResponse { - // Opaque static publish properties of the volume. SP MAY use this - // field to ensure subsequent `NodeStageVolume` or `NodePublishVolume` - // calls calls have contextual information. - // The contents of this field SHALL be opaque to a CO. - // The contents of this field SHALL NOT be mutable. - // The contents of this field SHALL be safe for the CO to cache. - // The contents of this field SHOULD NOT contain sensitive - // information. - // The contents of this field SHOULD NOT be used for uniquely - // identifying a volume. The `volume_id` alone SHOULD be sufficient to - // identify the volume. - // This field is OPTIONAL and when present MUST be passed to - // subsequent `NodeStageVolume` or `NodePublishVolume` calls - map publish_context = 1; -} -message ControllerUnpublishVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The ID of the node. This field is OPTIONAL. The CO SHOULD set this - // field to match the node ID returned by `NodeGetInfo` or leave it - // unset. If the value is set, the SP MUST unpublish the volume from - // the specified node. If the value is unset, the SP MUST unpublish - // the volume from all nodes it is published to. - string node_id = 2; - - // Secrets required by plugin to complete controller unpublish volume - // request. This SHOULD be the same secrets passed to the - // ControllerPublishVolume call for the specified volume. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 3 [(csi_secret) = true]; -} - -message ControllerUnpublishVolumeResponse { - // Intentionally empty. -} -message ValidateVolumeCapabilitiesRequest { - // The ID of the volume to check. This field is REQUIRED. - string volume_id = 1; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 2; - - // The capabilities that the CO wants to check for the volume. This - // call SHALL return "confirmed" only if all the volume capabilities - // specified below are supported. This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 3; - - // See CreateVolumeRequest.parameters. - // This field is OPTIONAL. - map parameters = 4; - - // Secrets required by plugin to complete volume validation request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 5 [(csi_secret) = true]; -} - -message ValidateVolumeCapabilitiesResponse { - message Confirmed { - // Volume context validated by the plugin. - // This field is OPTIONAL. - map volume_context = 1; - - // Volume capabilities supported by the plugin. - // This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 2; - - // The volume creation parameters validated by the plugin. - // This field is OPTIONAL. - map parameters = 3; - } - - // Confirmed indicates to the CO the set of capabilities that the - // plugin has validated. This field SHALL only be set to a non-empty - // value for successful validation responses. - // For successful validation responses, the CO SHALL compare the - // fields of this message to the originally requested capabilities in - // order to guard against an older plugin reporting "valid" for newer - // capability fields that it does not yet understand. - // This field is OPTIONAL. - Confirmed confirmed = 1; - - // Message to the CO if `confirmed` above is empty. This field is - // OPTIONAL. - // An empty string is equal to an unspecified field value. - string message = 2; -} -message ListVolumesRequest { - // If specified (non-zero value), the Plugin MUST NOT return more - // entries than this number in the response. If the actual number of - // entries is more than this number, the Plugin MUST set `next_token` - // in the response which can be used to get the next page of entries - // in the subsequent `ListVolumes` call. This field is OPTIONAL. If - // not specified (zero value), it means there is no restriction on the - // number of entries that can be returned. - // The value of this field MUST NOT be negative. - int32 max_entries = 1; - - // A token to specify where to start paginating. Set this field to - // `next_token` returned by a previous `ListVolumes` call to get the - // next page of entries. This field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string starting_token = 2; -} - -message ListVolumesResponse { - message Entry { - Volume volume = 1; - } - - repeated Entry entries = 1; - - // This token allows you to get the next page of entries for - // `ListVolumes` request. If the number of entries is larger than - // `max_entries`, use the `next_token` as a value for the - // `starting_token` field in the next `ListVolumes` request. This - // field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string next_token = 2; -} -message GetCapacityRequest { - // If specified, the Plugin SHALL report the capacity of the storage - // that can be used to provision volumes that satisfy ALL of the - // specified `volume_capabilities`. These are the same - // `volume_capabilities` the CO will use in `CreateVolumeRequest`. - // This field is OPTIONAL. - repeated VolumeCapability volume_capabilities = 1; - - // If specified, the Plugin SHALL report the capacity of the storage - // that can be used to provision volumes with the given Plugin - // specific `parameters`. These are the same `parameters` the CO will - // use in `CreateVolumeRequest`. This field is OPTIONAL. - map parameters = 2; - - // If specified, the Plugin SHALL report the capacity of the storage - // that can be used to provision volumes that in the specified - // `accessible_topology`. This is the same as the - // `accessible_topology` the CO returns in a `CreateVolumeResponse`. - // This field is OPTIONAL. This field SHALL NOT be set unless the - // plugin advertises the VOLUME_ACCESSIBILITY_CONSTRAINTS capability. - Topology accessible_topology = 3; -} - -message GetCapacityResponse { - // The available capacity, in bytes, of the storage that can be used - // to provision volumes. If `volume_capabilities` or `parameters` is - // specified in the request, the Plugin SHALL take those into - // consideration when calculating the available capacity of the - // storage. This field is REQUIRED. - // The value of this field MUST NOT be negative. - int64 available_capacity = 1; -} -message ControllerGetCapabilitiesRequest { - // Intentionally empty. -} - -message ControllerGetCapabilitiesResponse { - // All the capabilities that the controller service supports. This - // field is OPTIONAL. - repeated ControllerServiceCapability capabilities = 1; -} - -// Specifies a capability of the controller service. -message ControllerServiceCapability { - message RPC { - enum Type { - UNKNOWN = 0; - CREATE_DELETE_VOLUME = 1; - PUBLISH_UNPUBLISH_VOLUME = 2; - LIST_VOLUMES = 3; - GET_CAPACITY = 4; - // Currently the only way to consume a snapshot is to create - // a volume from it. Therefore plugins supporting - // CREATE_DELETE_SNAPSHOT MUST support creating volume from - // snapshot. - CREATE_DELETE_SNAPSHOT = 5; - LIST_SNAPSHOTS = 6; - - // Plugins supporting volume cloning at the storage level MAY - // report this capability. The source volume MUST be managed by - // the same plugin. Not all volume sources and parameters - // combinations MAY work. - CLONE_VOLUME = 7; - - // Indicates the SP supports ControllerPublishVolume.readonly - // field. - PUBLISH_READONLY = 8; - - // See VolumeExpansion for details. - EXPAND_VOLUME = 9; - } - - Type type = 1; - } - - oneof type { - // RPC that the controller supports. - RPC rpc = 1; - } -} -message CreateSnapshotRequest { - // The ID of the source volume to be snapshotted. - // This field is REQUIRED. - string source_volume_id = 1; - - // The suggested name for the snapshot. This field is REQUIRED for - // idempotency. - // Any Unicode string that conforms to the length limit is allowed - // except those containing the following banned characters: - // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. - // (These are control characters other than commonly used whitespace.) - string name = 2; - - // Secrets required by plugin to complete snapshot creation request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 3 [(csi_secret) = true]; - - // Plugin specific parameters passed in as opaque key-value pairs. - // This field is OPTIONAL. The Plugin is responsible for parsing and - // validating these parameters. COs will treat these as opaque. - // Use cases for opaque parameters: - // - Specify a policy to automatically clean up the snapshot. - // - Specify an expiration date for the snapshot. - // - Specify whether the snapshot is readonly or read/write. - // - Specify if the snapshot should be replicated to some place. - // - Specify primary or secondary for replication systems that - // support snapshotting only on primary. - map parameters = 4; -} - -message CreateSnapshotResponse { - // Contains all attributes of the newly created snapshot that are - // relevant to the CO along with information required by the Plugin - // to uniquely identify the snapshot. This field is REQUIRED. - Snapshot snapshot = 1; -} - -// Information about a specific snapshot. -message Snapshot { - // This is the complete size of the snapshot in bytes. The purpose of - // this field is to give CO guidance on how much space is needed to - // create a volume from this snapshot. The size of the volume MUST NOT - // be less than the size of the source snapshot. This field is - // OPTIONAL. If this field is not set, it indicates that this size is - // unknown. The value of this field MUST NOT be negative and a size of - // zero means it is unspecified. - int64 size_bytes = 1; - - // The identifier for this snapshot, generated by the plugin. - // This field is REQUIRED. - // This field MUST contain enough information to uniquely identify - // this specific snapshot vs all other snapshots supported by this - // plugin. - // This field SHALL be used by the CO in subsequent calls to refer to - // this snapshot. - // The SP is NOT responsible for global uniqueness of snapshot_id - // across multiple SPs. - string snapshot_id = 2; - - // Identity information for the source volume. Note that creating a - // snapshot from a snapshot is not supported here so the source has to - // be a volume. This field is REQUIRED. - string source_volume_id = 3; - - // Timestamp when the point-in-time snapshot is taken on the storage - // system. This field is REQUIRED. - .google.protobuf.Timestamp creation_time = 4; - - // Indicates if a snapshot is ready to use as a - // `volume_content_source` in a `CreateVolumeRequest`. The default - // value is false. This field is REQUIRED. - bool ready_to_use = 5; -} -message DeleteSnapshotRequest { - // The ID of the snapshot to be deleted. - // This field is REQUIRED. - string snapshot_id = 1; - - // Secrets required by plugin to complete snapshot deletion request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 2 [(csi_secret) = true]; -} - -message DeleteSnapshotResponse {} -// List all snapshots on the storage system regardless of how they were -// created. -message ListSnapshotsRequest { - // If specified (non-zero value), the Plugin MUST NOT return more - // entries than this number in the response. If the actual number of - // entries is more than this number, the Plugin MUST set `next_token` - // in the response which can be used to get the next page of entries - // in the subsequent `ListSnapshots` call. This field is OPTIONAL. If - // not specified (zero value), it means there is no restriction on the - // number of entries that can be returned. - // The value of this field MUST NOT be negative. - int32 max_entries = 1; - - // A token to specify where to start paginating. Set this field to - // `next_token` returned by a previous `ListSnapshots` call to get the - // next page of entries. This field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string starting_token = 2; - - // Identity information for the source volume. This field is OPTIONAL. - // It can be used to list snapshots by volume. - string source_volume_id = 3; - - // Identity information for a specific snapshot. This field is - // OPTIONAL. It can be used to list only a specific snapshot. - // ListSnapshots will return with current snapshot information - // and will not block if the snapshot is being processed after - // it is cut. - string snapshot_id = 4; -} - -message ListSnapshotsResponse { - message Entry { - Snapshot snapshot = 1; - } - - repeated Entry entries = 1; - - // This token allows you to get the next page of entries for - // `ListSnapshots` request. If the number of entries is larger than - // `max_entries`, use the `next_token` as a value for the - // `starting_token` field in the next `ListSnapshots` request. This - // field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string next_token = 2; -} -message ControllerExpandVolumeRequest { - // The ID of the volume to expand. This field is REQUIRED. - string volume_id = 1; - - // This allows CO to specify the capacity requirements of the volume - // after expansion. This field is REQUIRED. - CapacityRange capacity_range = 2; - - // Secrets required by the plugin for expanding the volume. - // This field is OPTIONAL. - map secrets = 3 [(csi_secret) = true]; -} - -message ControllerExpandVolumeResponse { - // Capacity of volume after expansion. This field is REQUIRED. - int64 capacity_bytes = 1; - - // Whether node expansion is required for the volume. When true - // the CO MUST make NodeExpandVolume RPC call on the node. This field - // is REQUIRED. - bool node_expansion_required = 2; -} -message NodeStageVolumeRequest { - // The ID of the volume to publish. This field is REQUIRED. - string volume_id = 1; - - // The CO SHALL set this field to the value returned by - // `ControllerPublishVolume` if the corresponding Controller Plugin - // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be - // left unset if the corresponding Controller Plugin does not have - // this capability. This is an OPTIONAL field. - map publish_context = 2; - - // The path to which the volume MAY be staged. It MUST be an - // absolute path in the root filesystem of the process serving this - // request, and MUST be a directory. The CO SHALL ensure that there - // is only one `staging_target_path` per volume. The CO SHALL ensure - // that the path is directory and that the process serving the - // request has `read` and `write` permission to that directory. The - // CO SHALL be responsible for creating the directory if it does not - // exist. - // This is a REQUIRED field. - string staging_target_path = 3; - - // Volume capability describing how the CO intends to use this volume. - // SP MUST ensure the CO can use the staged volume as described. - // Otherwise SP MUST return the appropriate gRPC error code. - // This is a REQUIRED field. - VolumeCapability volume_capability = 4; - - // Secrets required by plugin to complete node stage volume request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 5 [(csi_secret) = true]; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 6; -} - -message NodeStageVolumeResponse { - // Intentionally empty. -} -message NodeUnstageVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The path at which the volume was staged. It MUST be an absolute - // path in the root filesystem of the process serving this request. - // This is a REQUIRED field. - string staging_target_path = 2; -} - -message NodeUnstageVolumeResponse { - // Intentionally empty. -} -message NodePublishVolumeRequest { - // The ID of the volume to publish. This field is REQUIRED. - string volume_id = 1; - - // The CO SHALL set this field to the value returned by - // `ControllerPublishVolume` if the corresponding Controller Plugin - // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be - // left unset if the corresponding Controller Plugin does not have - // this capability. This is an OPTIONAL field. - map publish_context = 2; - - // The path to which the volume was staged by `NodeStageVolume`. - // It MUST be an absolute path in the root filesystem of the process - // serving this request. - // It MUST be set if the Node Plugin implements the - // `STAGE_UNSTAGE_VOLUME` node capability. - // This is an OPTIONAL field. - string staging_target_path = 3; - - // The path to which the volume will be published. It MUST be an - // absolute path in the root filesystem of the process serving this - // request. The CO SHALL ensure uniqueness of target_path per volume. - // The CO SHALL ensure that the parent directory of this path exists - // and that the process serving the request has `read` and `write` - // permissions to that parent directory. - // For volumes with an access type of block, the SP SHALL place the - // block device at target_path. - // For volumes with an access type of mount, the SP SHALL place the - // mounted directory at target_path. - // Creation of target_path is the responsibility of the SP. - // This is a REQUIRED field. - string target_path = 4; - - // Volume capability describing how the CO intends to use this volume. - // SP MUST ensure the CO can use the published volume as described. - // Otherwise SP MUST return the appropriate gRPC error code. - // This is a REQUIRED field. - VolumeCapability volume_capability = 5; - - // Indicates SP MUST publish the volume in readonly mode. - // This field is REQUIRED. - bool readonly = 6; - - // Secrets required by plugin to complete node publish volume request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 7 [(csi_secret) = true]; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 8; -} - -message NodePublishVolumeResponse { - // Intentionally empty. -} -message NodeUnpublishVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The path at which the volume was published. It MUST be an absolute - // path in the root filesystem of the process serving this request. - // The SP MUST delete the file or directory it created at this path. - // This is a REQUIRED field. - string target_path = 2; -} - -message NodeUnpublishVolumeResponse { - // Intentionally empty. -} -message NodeGetVolumeStatsRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // It can be any valid path where volume was previously - // staged or published. - // It MUST be an absolute path in the root filesystem of - // the process serving this request. - // This is a REQUIRED field. - string volume_path = 2; -} - -message NodeGetVolumeStatsResponse { - // This field is OPTIONAL. - repeated VolumeUsage usage = 1; -} - -message VolumeUsage { - enum Unit { - UNKNOWN = 0; - BYTES = 1; - INODES = 2; - } - // The available capacity in specified Unit. This field is OPTIONAL. - // The value of this field MUST NOT be negative. - int64 available = 1; - - // The total capacity in specified Unit. This field is REQUIRED. - // The value of this field MUST NOT be negative. - int64 total = 2; - - // The used capacity in specified Unit. This field is OPTIONAL. - // The value of this field MUST NOT be negative. - int64 used = 3; - - // Units by which values are measured. This field is REQUIRED. - Unit unit = 4; -} -message NodeGetCapabilitiesRequest { - // Intentionally empty. -} - -message NodeGetCapabilitiesResponse { - // All the capabilities that the node service supports. This field - // is OPTIONAL. - repeated NodeServiceCapability capabilities = 1; -} - -// Specifies a capability of the node service. -message NodeServiceCapability { - message RPC { - enum Type { - UNKNOWN = 0; - STAGE_UNSTAGE_VOLUME = 1; - // If Plugin implements GET_VOLUME_STATS capability - // then it MUST implement NodeGetVolumeStats RPC - // call for fetching volume statistics. - GET_VOLUME_STATS = 2; - // See VolumeExpansion for details. - EXPAND_VOLUME = 3; - } - - Type type = 1; - } - - oneof type { - // RPC that the controller supports. - RPC rpc = 1; - } -} -message NodeGetInfoRequest { -} - -message NodeGetInfoResponse { - // The identifier of the node as understood by the SP. - // This field is REQUIRED. - // This field MUST contain enough information to uniquely identify - // this specific node vs all other nodes supported by this plugin. - // This field SHALL be used by the CO in subsequent calls, including - // `ControllerPublishVolume`, to refer to this node. - // The SP is NOT responsible for global uniqueness of node_id across - // multiple SPs. - string node_id = 1; - - // Maximum number of volumes that controller can publish to the node. - // If value is not set or zero CO SHALL decide how many volumes of - // this type can be published by the controller to the node. The - // plugin MUST NOT set negative values here. - // This field is OPTIONAL. - int64 max_volumes_per_node = 2; - - // Specifies where (regions, zones, racks, etc.) the node is - // accessible from. - // A plugin that returns this field MUST also set the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. - // COs MAY use this information along with the topology information - // returned in CreateVolumeResponse to ensure that a given volume is - // accessible from a given node when scheduling workloads. - // This field is OPTIONAL. If it is not specified, the CO MAY assume - // the node is not subject to any topological constraint, and MAY - // schedule workloads that reference any volume V, such that there are - // no topological constraints declared for V. - // - // Example 1: - // accessible_topology = - // {"region": "R1", "zone": "Z2"} - // Indicates the node exists within the "region" "R1" and the "zone" - // "Z2". - Topology accessible_topology = 3; -} -message NodeExpandVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The path on which volume is available. This field is REQUIRED. - string volume_path = 2; - - // This allows CO to specify the capacity requirements of the volume - // after expansion. If capacity_range is omitted then a plugin MAY - // inspect the file system of the volume to determine the maximum - // capacity to which the volume can be expanded. In such cases a - // plugin MAY expand the volume to its maximum capacity. - // This field is OPTIONAL. - CapacityRange capacity_range = 3; -} - -message NodeExpandVolumeResponse { - // The capacity of the volume in bytes. This field is OPTIONAL. - int64 capacity_bytes = 1; -} diff --git a/vendor/github.com/container-storage-interface/spec/lib/README.md b/vendor/github.com/container-storage-interface/spec/lib/README.md deleted file mode 100644 index 1cc2aade44..0000000000 --- a/vendor/github.com/container-storage-interface/spec/lib/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# CSI Validation Libraries -This directory contains language bindings generated from the CSI [protobuf file](../csi.proto) used to validate the model and workflows of the CSI specification. diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore b/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore deleted file mode 100644 index 44dae3ea83..0000000000 --- a/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/protoc -/protoc-gen-go -/csi.a -/.protoc diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/Makefile b/vendor/github.com/container-storage-interface/spec/lib/go/Makefile deleted file mode 100644 index 3b1c5eabac..0000000000 --- a/vendor/github.com/container-storage-interface/spec/lib/go/Makefile +++ /dev/null @@ -1,136 +0,0 @@ -all: build - -######################################################################## -## GOLANG ## -######################################################################## - -# If GOPATH isn't defined then set its default location. -ifeq (,$(strip $(GOPATH))) -GOPATH := $(HOME)/go -else -# If GOPATH is already set then update GOPATH to be its own -# first element. -GOPATH := $(word 1,$(subst :, ,$(GOPATH))) -endif -export GOPATH - - -######################################################################## -## PROTOC ## -######################################################################## - -# Only set PROTOC_VER if it has an empty value. -ifeq (,$(strip $(PROTOC_VER))) -PROTOC_VER := 3.5.1 -endif - -PROTOC_OS := $(shell uname -s) -ifeq (Darwin,$(PROTOC_OS)) -PROTOC_OS := osx -endif - -PROTOC_ARCH := $(shell uname -m) -ifeq (i386,$(PROTOC_ARCH)) -PROTOC_ARCH := x86_32 -endif - -PROTOC := ./protoc -PROTOC_ZIP := protoc-$(PROTOC_VER)-$(PROTOC_OS)-$(PROTOC_ARCH).zip -PROTOC_URL := https://github.com/google/protobuf/releases/download/v$(PROTOC_VER)/$(PROTOC_ZIP) -PROTOC_TMP_DIR := .protoc -PROTOC_TMP_BIN := $(PROTOC_TMP_DIR)/bin/protoc - -$(PROTOC): - -mkdir -p "$(PROTOC_TMP_DIR)" && \ - curl -L $(PROTOC_URL) -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" && \ - unzip "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" -d "$(PROTOC_TMP_DIR)" && \ - chmod 0755 "$(PROTOC_TMP_BIN)" && \ - cp -f "$(PROTOC_TMP_BIN)" "$@" - stat "$@" > /dev/null 2>&1 - - -######################################################################## -## PROTOC-GEN-GO ## -######################################################################## - -# This is the recipe for getting and installing the go plug-in -# for protoc -PROTOC_GEN_GO_PKG := github.com/golang/protobuf/protoc-gen-go -PROTOC_GEN_GO := protoc-gen-go -$(PROTOC_GEN_GO): PROTOBUF_PKG := $(dir $(PROTOC_GEN_GO_PKG)) -$(PROTOC_GEN_GO): PROTOBUF_VERSION := v1.2.0 -$(PROTOC_GEN_GO): - mkdir -p $(dir $(GOPATH)/src/$(PROTOBUF_PKG)) - test -d $(GOPATH)/src/$(PROTOBUF_PKG)/.git || git clone https://$(PROTOBUF_PKG) $(GOPATH)/src/$(PROTOBUF_PKG) - (cd $(GOPATH)/src/$(PROTOBUF_PKG) && \ - (test "$$(git describe --tags | head -1)" = "$(PROTOBUF_VERSION)" || \ - (git fetch && git checkout tags/$(PROTOBUF_VERSION)))) - (cd $(GOPATH)/src/$(PROTOBUF_PKG) && go get -v -d $$(go list -f '{{ .ImportPath }}' ./...)) && \ - go build -o "$@" $(PROTOC_GEN_GO_PKG) - - -######################################################################## -## PATH ## -######################################################################## - -# Update PATH with the current directory. This enables the protoc -# binary to discover the protoc-gen-go binary, built inside this -# directory. -export PATH := $(shell pwd):$(PATH) - - -######################################################################## -## BUILD ## -######################################################################## -CSI_PROTO := ../../csi.proto -CSI_PKG_ROOT := github.com/container-storage-interface/spec -CSI_PKG_SUB := $(shell cat $(CSI_PROTO) | sed -n -e 's/^package.\([^;]*\).v[0-9]\+;$$/\1/p'|tr '.' '/') -CSI_BUILD := $(CSI_PKG_SUB)/.build -CSI_GO := $(CSI_PKG_SUB)/csi.pb.go -CSI_A := csi.a -CSI_GO_TMP := $(CSI_BUILD)/$(CSI_PKG_ROOT)/csi.pb.go - -# This recipe generates the go language bindings to a temp area. -$(CSI_GO_TMP): HERE := $(shell pwd) -$(CSI_GO_TMP): PTYPES_PKG := github.com/golang/protobuf/ptypes -$(CSI_GO_TMP): GO_OUT := plugins=grpc -$(CSI_GO_TMP): GO_OUT := $(GO_OUT),Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor -$(CSI_GO_TMP): GO_OUT := $(GO_OUT),Mgoogle/protobuf/wrappers.proto=$(PTYPES_PKG)/wrappers -$(CSI_GO_TMP): GO_OUT := $(GO_OUT):"$(HERE)/$(CSI_BUILD)" -$(CSI_GO_TMP): INCLUDE := -I$(GOPATH)/src -I$(HERE)/$(PROTOC_TMP_DIR)/include -$(CSI_GO_TMP): $(CSI_PROTO) | $(PROTOC) $(PROTOC_GEN_GO) - @mkdir -p "$(@D)" - (cd "$(GOPATH)/src" && \ - $(HERE)/$(PROTOC) $(INCLUDE) --go_out=$(GO_OUT) "$(CSI_PKG_ROOT)/$( /dev/null 2>&1 || cp -f "$?" "$@" -endif - -# This recipe builds the Go archive from the sources in three steps: -# -# 1. Go get any missing dependencies. -# 2. Cache the packages. -# 3. Build the archive file. -$(CSI_A): $(CSI_GO) - go get -v -d ./... - go install ./$(CSI_PKG_SUB) - go build -o "$@" ./$(CSI_PKG_SUB) - -build: $(CSI_A) - -clean: - go clean -i ./... - rm -rf "$(CSI_A)" "$(CSI_GO)" "$(CSI_BUILD)" - -clobber: clean - rm -fr "$(PROTOC)" "$(PROTOC_GEN_GO)" "$(CSI_PKG_SUB)" - -.PHONY: clean clobber diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/README.md b/vendor/github.com/container-storage-interface/spec/lib/go/README.md deleted file mode 100644 index 79c48ade52..0000000000 --- a/vendor/github.com/container-storage-interface/spec/lib/go/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# CSI Go Validation - -This package is used to validate the CSI specification with Go language bindings. - -## Build Reference - -To validate the Go language bindings against the current specification use the following command: - -```bash -$ make -``` - -The above command will download the `protoc` and `protoc-gen-go` binaries if they are not present and then proceed to build the CSI Go language bindings. - -### Environment Variables - -The following table lists the environment variables that can be used to influence the behavior of the Makefile: - -| Name | Default Value | Description | -|------|---------------|-------------| -| `PROTOC_VER` | `3.3.0` | The version of the protoc binary. | diff --git a/vendor/github.com/container-storage-interface/spec/logo.png b/vendor/github.com/container-storage-interface/spec/logo.png deleted file mode 100755 index a4256afab8..0000000000 Binary files a/vendor/github.com/container-storage-interface/spec/logo.png and /dev/null differ diff --git a/vendor/github.com/container-storage-interface/spec/spec.md b/vendor/github.com/container-storage-interface/spec/spec.md deleted file mode 100644 index ccef4b624f..0000000000 --- a/vendor/github.com/container-storage-interface/spec/spec.md +++ /dev/null @@ -1,2459 +0,0 @@ -# Container Storage Interface (CSI) - -Authors: - -* Jie Yu <> (@jieyu) -* Saad Ali <> (@saad-ali) -* James DeFelice <> (@jdef) -* - -## Notational Conventions - -The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in [RFC 2119](http://tools.ietf.org/html/rfc2119) (Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997). - -The key words "unspecified", "undefined", and "implementation-defined" are to be interpreted as described in the [rationale for the C99 standard](http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf#page=18). - -An implementation is not compliant if it fails to satisfy one or more of the MUST, REQUIRED, or SHALL requirements for the protocols it implements. -An implementation is compliant if it satisfies all the MUST, REQUIRED, and SHALL requirements for the protocols it implements. - -## Terminology - -| Term | Definition | -|-------------------|--------------------------------------------------| -| Volume | A unit of storage that will be made available inside of a CO-managed container, via the CSI. | -| Block Volume | A volume that will appear as a block device inside the container. | -| Mounted Volume | A volume that will be mounted using the specified file system and appear as a directory inside the container. | -| CO | Container Orchestration system, communicates with Plugins using CSI service RPCs. | -| SP | Storage Provider, the vendor of a CSI plugin implementation. | -| RPC | [Remote Procedure Call](https://en.wikipedia.org/wiki/Remote_procedure_call). | -| Node | A host where the user workload will be running, uniquely identifiable from the perspective of a Plugin by a node ID. | -| Plugin | Aka “plugin implementation”, a gRPC endpoint that implements the CSI Services. | -| Plugin Supervisor | Process that governs the lifecycle of a Plugin, MAY be the CO. | -| Workload | The atomic unit of "work" scheduled by a CO. This MAY be a container or a collection of containers. | - -## Objective - -To define an industry standard “Container Storage Interface” (CSI) that will enable storage vendors (SP) to develop a plugin once and have it work across a number of container orchestration (CO) systems. - -### Goals in MVP - -The Container Storage Interface (CSI) will - -* Enable SP authors to write one CSI compliant Plugin that “just works” across all COs that implement CSI. -* Define API (RPCs) that enable: - * Dynamic provisioning and deprovisioning of a volume. - * Attaching or detaching a volume from a node. - * Mounting/unmounting a volume from a node. - * Consumption of both block and mountable volumes. - * Local storage providers (e.g., device mapper, lvm). - * Creating and deleting a snapshot (source of the snapshot is a volume). - * Provisioning a new volume from a snapshot (reverting snapshot, where data in the original volume is erased and replaced with data in the snapshot, is out of scope). -* Define plugin protocol RECOMMENDATIONS. - * Describe a process by which a Supervisor configures a Plugin. - * Container deployment considerations (`CAP_SYS_ADMIN`, mount namespace, etc.). - -### Non-Goals in MVP - -The Container Storage Interface (CSI) explicitly will not define, provide, or dictate: - -* Specific mechanisms by which a Plugin Supervisor manages the lifecycle of a Plugin, including: - * How to maintain state (e.g. what is attached, mounted, etc.). - * How to deploy, install, upgrade, uninstall, monitor, or respawn (in case of unexpected termination) Plugins. -* A first class message structure/field to represent "grades of storage" (aka "storage class"). -* Protocol-level authentication and authorization. -* Packaging of a Plugin. -* POSIX compliance: CSI provides no guarantee that volumes provided are POSIX compliant filesystems. - Compliance is determined by the Plugin implementation (and any backend storage system(s) upon which it depends). - CSI SHALL NOT obstruct a Plugin Supervisor or CO from interacting with Plugin-managed volumes in a POSIX-compliant manner. - -## Solution Overview - -This specification defines an interface along with the minimum operational and packaging recommendations for a storage provider (SP) to implement a CSI compatible plugin. -The interface declares the RPCs that a plugin MUST expose: this is the **primary focus** of the CSI specification. -Any operational and packaging recommendations offer additional guidance to promote cross-CO compatibility. - -### Architecture - -The primary focus of this specification is on the **protocol** between a CO and a Plugin. -It SHOULD be possible to ship cross-CO compatible Plugins for a variety of deployment architectures. -A CO SHOULD be equipped to handle both centralized and headless plugins, as well as split-component and unified plugins. -Several of these possibilities are illustrated in the following figures. - -``` - CO "Master" Host -+-------------------------------------------+ -| | -| +------------+ +------------+ | -| | CO | gRPC | Controller | | -| | +-----------> Plugin | | -| +------------+ +------------+ | -| | -+-------------------------------------------+ - - CO "Node" Host(s) -+-------------------------------------------+ -| | -| +------------+ +------------+ | -| | CO | gRPC | Node | | -| | +-----------> Plugin | | -| +------------+ +------------+ | -| | -+-------------------------------------------+ - -Figure 1: The Plugin runs on all nodes in the cluster: a centralized -Controller Plugin is available on the CO master host and the Node -Plugin is available on all of the CO Nodes. -``` - -``` - CO "Node" Host(s) -+-------------------------------------------+ -| | -| +------------+ +------------+ | -| | CO | gRPC | Controller | | -| | +--+--------> Plugin | | -| +------------+ | +------------+ | -| | | -| | | -| | +------------+ | -| | | Node | | -| +--------> Plugin | | -| +------------+ | -| | -+-------------------------------------------+ - -Figure 2: Headless Plugin deployment, only the CO Node hosts run -Plugins. Separate, split-component Plugins supply the Controller -Service and the Node Service respectively. -``` - -``` - CO "Node" Host(s) -+-------------------------------------------+ -| | -| +------------+ +------------+ | -| | CO | gRPC | Controller | | -| | +-----------> Node | | -| +------------+ | Plugin | | -| +------------+ | -| | -+-------------------------------------------+ - -Figure 3: Headless Plugin deployment, only the CO Node hosts run -Plugins. A unified Plugin component supplies both the Controller -Service and Node Service. -``` - -``` - CO "Node" Host(s) -+-------------------------------------------+ -| | -| +------------+ +------------+ | -| | CO | gRPC | Node | | -| | +-----------> Plugin | | -| +------------+ +------------+ | -| | -+-------------------------------------------+ - -Figure 4: Headless Plugin deployment, only the CO Node hosts run -Plugins. A Node-only Plugin component supplies only the Node Service. -Its GetPluginCapabilities RPC does not report the CONTROLLER_SERVICE -capability. -``` - -### Volume Lifecycle - -``` - CreateVolume +------------+ DeleteVolume - +------------->| CREATED +--------------+ - | +---+----+---+ | - | Controller | | Controller v -+++ Publish | | Unpublish +++ -|X| Volume | | Volume | | -+-+ +---v----+---+ +-+ - | NODE_READY | - +---+----^---+ - Node | | Node - Publish | | Unpublish - Volume | | Volume - +---v----+---+ - | PUBLISHED | - +------------+ - -Figure 5: The lifecycle of a dynamically provisioned volume, from -creation to destruction. -``` - -``` - CreateVolume +------------+ DeleteVolume - +------------->| CREATED +--------------+ - | +---+----+---+ | - | Controller | | Controller v -+++ Publish | | Unpublish +++ -|X| Volume | | Volume | | -+-+ +---v----+---+ +-+ - | NODE_READY | - +---+----^---+ - Node | | Node - Stage | | Unstage - Volume | | Volume - +---v----+---+ - | VOL_READY | - +------------+ - Node | | Node - Publish | | Unpublish - Volume | | Volume - +---v----+---+ - | PUBLISHED | - +------------+ - -Figure 6: The lifecycle of a dynamically provisioned volume, from -creation to destruction, when the Node Plugin advertises the -STAGE_UNSTAGE_VOLUME capability. -``` - -``` - Controller Controller - Publish Unpublish - Volume +------------+ Volume - +------------->+ NODE_READY +--------------+ - | +---+----^---+ | - | Node | | Node v -+++ Publish | | Unpublish +++ -|X| <-+ Volume | | Volume | | -+++ | +---v----+---+ +-+ - | | | PUBLISHED | - | | +------------+ - +----+ - Validate - Volume - Capabilities - -Figure 7: The lifecycle of a pre-provisioned volume that requires -controller to publish to a node (`ControllerPublishVolume`) prior to -publishing on the node (`NodePublishVolume`). -``` - -``` - +-+ +-+ - |X| | | - +++ +^+ - | | - Node | | Node -Publish | | Unpublish - Volume | | Volume - +---v----+---+ - | PUBLISHED | - +------------+ - -Figure 8: Plugins MAY forego other lifecycle steps by contraindicating -them via the capabilities API. Interactions with the volumes of such -plugins is reduced to `NodePublishVolume` and `NodeUnpublishVolume` -calls. -``` - -The above diagrams illustrate a general expectation with respect to how a CO MAY manage the lifecycle of a volume via the API presented in this specification. -Plugins SHOULD expose all RPCs for an interface: Controller plugins SHOULD implement all RPCs for the `Controller` service. -Unsupported RPCs SHOULD return an appropriate error code that indicates such (e.g. `CALL_NOT_IMPLEMENTED`). -The full list of plugin capabilities is documented in the `ControllerGetCapabilities` and `NodeGetCapabilities` RPCs. - -## Container Storage Interface - -This section describes the interface between COs and Plugins. - -### RPC Interface - -A CO interacts with an Plugin through RPCs. -Each SP MUST provide: - -* **Node Plugin**: A gRPC endpoint serving CSI RPCs that MUST be run on the Node whereupon an SP-provisioned volume will be published. -* **Controller Plugin**: A gRPC endpoint serving CSI RPCs that MAY be run anywhere. -* In some circumstances a single gRPC endpoint MAY serve all CSI RPCs (see Figure 3 in [Architecture](#architecture)). - -```protobuf -syntax = "proto3"; -package csi.v1; - -import "google/protobuf/descriptor.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option go_package = "csi"; - -extend google.protobuf.FieldOptions { - // Indicates that a field MAY contain information that is sensitive - // and MUST be treated as such (e.g. not logged). - bool csi_secret = 1059; -} -``` - -There are three sets of RPCs: - -* **Identity Service**: Both the Node Plugin and the Controller Plugin MUST implement this sets of RPCs. -* **Controller Service**: The Controller Plugin MUST implement this sets of RPCs. -* **Node Service**: The Node Plugin MUST implement this sets of RPCs. - -```protobuf -service Identity { - rpc GetPluginInfo(GetPluginInfoRequest) - returns (GetPluginInfoResponse) {} - - rpc GetPluginCapabilities(GetPluginCapabilitiesRequest) - returns (GetPluginCapabilitiesResponse) {} - - rpc Probe (ProbeRequest) - returns (ProbeResponse) {} -} - -service Controller { - rpc CreateVolume (CreateVolumeRequest) - returns (CreateVolumeResponse) {} - - rpc DeleteVolume (DeleteVolumeRequest) - returns (DeleteVolumeResponse) {} - - rpc ControllerPublishVolume (ControllerPublishVolumeRequest) - returns (ControllerPublishVolumeResponse) {} - - rpc ControllerUnpublishVolume (ControllerUnpublishVolumeRequest) - returns (ControllerUnpublishVolumeResponse) {} - - rpc ValidateVolumeCapabilities (ValidateVolumeCapabilitiesRequest) - returns (ValidateVolumeCapabilitiesResponse) {} - - rpc ListVolumes (ListVolumesRequest) - returns (ListVolumesResponse) {} - - rpc GetCapacity (GetCapacityRequest) - returns (GetCapacityResponse) {} - - rpc ControllerGetCapabilities (ControllerGetCapabilitiesRequest) - returns (ControllerGetCapabilitiesResponse) {} - - rpc CreateSnapshot (CreateSnapshotRequest) - returns (CreateSnapshotResponse) {} - - rpc DeleteSnapshot (DeleteSnapshotRequest) - returns (DeleteSnapshotResponse) {} - - rpc ListSnapshots (ListSnapshotsRequest) - returns (ListSnapshotsResponse) {} - - rpc ControllerExpandVolume (ControllerExpandVolumeRequest) - returns (ControllerExpandVolumeResponse) {} -} - -service Node { - rpc NodeStageVolume (NodeStageVolumeRequest) - returns (NodeStageVolumeResponse) {} - - rpc NodeUnstageVolume (NodeUnstageVolumeRequest) - returns (NodeUnstageVolumeResponse) {} - - rpc NodePublishVolume (NodePublishVolumeRequest) - returns (NodePublishVolumeResponse) {} - - rpc NodeUnpublishVolume (NodeUnpublishVolumeRequest) - returns (NodeUnpublishVolumeResponse) {} - - rpc NodeGetVolumeStats (NodeGetVolumeStatsRequest) - returns (NodeGetVolumeStatsResponse) {} - - - rpc NodeExpandVolume(NodeExpandVolumeRequest) - returns (NodeExpandVolumeResponse) {} - - - rpc NodeGetCapabilities (NodeGetCapabilitiesRequest) - returns (NodeGetCapabilitiesResponse) {} - - rpc NodeGetInfo (NodeGetInfoRequest) - returns (NodeGetInfoResponse) {} -} -``` - -#### Concurrency - -In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call “in-flight” per volume at a given time. -However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same volume. -The plugin SHOULD handle this as gracefully as possible. -The error code `ABORTED` MAY be returned by the plugin in this case (see the [Error Scheme](#error-scheme) section for details). - -#### Field Requirements - -The requirements documented herein apply equally and without exception, unless otherwise noted, for the fields of all protobuf message types defined by this specification. -Violation of these requirements MAY result in RPC message data that is not compatible with all CO, Plugin, and/or CSI middleware implementations. - -##### Size Limits - -CSI defines general size limits for fields of various types (see table below). -The general size limit for a particular field MAY be overridden by specifying a different size limit in said field's description. -Unless otherwise specified, fields SHALL NOT exceed the limits documented here. -These limits apply for messages generated by both COs and plugins. - -| Size | Field Type | -|------------|---------------------| -| 128 bytes | string | -| 4 KiB | map | - -##### `REQUIRED` vs. `OPTIONAL` - -* A field noted as `REQUIRED` MUST be specified, subject to any per-RPC caveats; caveats SHOULD be rare. -* A `repeated` or `map` field listed as `REQUIRED` MUST contain at least 1 element. -* A field noted as `OPTIONAL` MAY be specified and the specification SHALL clearly define expected behavior for the default, zero-value of such fields. - -Scalar fields, even REQUIRED ones, will be defaulted if not specified and any field set to the default value will not be serialized over the wire as per [proto3](https://developers.google.com/protocol-buffers/docs/proto3#default). - -#### Timeouts - -Any of the RPCs defined in this spec MAY timeout and MAY be retried. -The CO MAY choose the maximum time it is willing to wait for a call, how long it waits between retries, and how many time it retries (these values are not negotiated between plugin and CO). - -Idempotency requirements ensure that a retried call with the same fields continues where it left off when retried. -The only way to cancel a call is to issue a "negation" call if one exists. -For example, issue a `ControllerUnpublishVolume` call to cancel a pending `ControllerPublishVolume` operation, etc. -In some cases, a CO MAY NOT be able to cancel a pending operation because it depends on the result of the pending operation in order to execute the "negation" call. -For example, if a `CreateVolume` call never completes then a CO MAY NOT have the `volume_id` to call `DeleteVolume` with. - -### Error Scheme - -All CSI API calls defined in this spec MUST return a [standard gRPC status](https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto). -Most gRPC libraries provide helper methods to set and read the status fields. - -The status `code` MUST contain a [canonical error code](https://github.com/grpc/grpc-go/blob/master/codes/codes.go). COs MUST handle all valid error codes. Each RPC defines a set of gRPC error codes that MUST be returned by the plugin when specified conditions are encountered. In addition to those, if the conditions defined below are encountered, the plugin MUST return the associated gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Missing required field | 3 INVALID_ARGUMENT | Indicates that a required field is missing from the request. More human-readable information MAY be provided in the `status.message` field. | Caller MUST fix the request by adding the missing required field before retrying. | -| Invalid or unsupported field in the request | 3 INVALID_ARGUMENT | Indicates that the one or more fields in this field is either not allowed by the Plugin or has an invalid value. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the field before retrying. | -| Permission denied | 7 PERMISSION_DENIED | The Plugin is able to derive or otherwise infer an identity from the secrets present within an RPC, but that identity does not have permission to invoke the RPC. | System administrator SHOULD ensure that requisite permissions are granted, after which point the caller MAY retry the attempted RPC. | -| Operation pending for volume | 10 ABORTED | Indicates that there is already an operation pending for the specified volume. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per volume at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same volume. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified volume, and then retry with exponential back off. | -| Call not implemented | 12 UNIMPLEMENTED | The invoked RPC is not implemented by the Plugin or disabled in the Plugin's current mode of operation. | Caller MUST NOT retry. Caller MAY call `GetPluginCapabilities`, `ControllerGetCapabilities`, or `NodeGetCapabilities` to discover Plugin capabilities. | -| Not authenticated | 16 UNAUTHENTICATED | The invoked RPC does not carry secrets that are valid for authentication. | Caller SHALL either fix the secrets provided in the RPC, or otherwise regalvanize said secrets such that they will pass authentication by the Plugin for the attempted RPC, after which point the caller MAY retry the attempted RPC. | - -The status `message` MUST contain a human readable description of error, if the status `code` is not `OK`. -This string MAY be surfaced by CO to end users. - -The status `details` MUST be empty. In the future, this spec MAY require `details` to return a machine-parsable protobuf message if the status `code` is not `OK` to enable CO's to implement smarter error handling and fault resolution. - -### Secrets Requirements - -Secrets MAY be required by plugin to complete a RPC request. -A secret is a string to string map where the key identifies the name of the secret (e.g. "username" or "password"), and the value contains the secret data (e.g. "bob" or "abc123"). -Each key MUST consist of alphanumeric characters, '-', '_' or '.'. -Each value MUST contain a valid string. -An SP MAY choose to accept binary (non-string) data by using a binary-to-text encoding scheme, like base64. -An SP SHALL advertise the requirements for required secret keys and values in documentation. -CO SHALL permit passing through the required secrets. -A CO MAY pass the same secrets to all RPCs, therefore the keys for all unique secrets that an SP expects MUST be unique across all CSI operations. -This information is sensitive and MUST be treated as such (not logged, etc.) by the CO. - -### Identity Service RPC - -Identity service RPCs allow a CO to query a plugin for capabilities, health, and other metadata. -The general flow of the success case MAY be as follows (protos illustrated in YAML for brevity): - -1. CO queries metadata via Identity RPC. - -``` - # CO --(GetPluginInfo)--> Plugin - request: - response: - name: org.foo.whizbang.super-plugin - vendor_version: blue-green - manifest: - baz: qaz -``` - -2. CO queries available capabilities of the plugin. - -``` - # CO --(GetPluginCapabilities)--> Plugin - request: - response: - capabilities: - - service: - type: CONTROLLER_SERVICE -``` - -3. CO queries the readiness of the plugin. - -``` - # CO --(Probe)--> Plugin - request: - response: {} -``` - -#### `GetPluginInfo` - -```protobuf -message GetPluginInfoRequest { - // Intentionally empty. -} - -message GetPluginInfoResponse { - // The name MUST follow domain name notation format - // (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD - // include the plugin's host company name and the plugin name, - // to minimize the possibility of collisions. It MUST be 63 - // characters or less, beginning and ending with an alphanumeric - // character ([a-z0-9A-Z]) with dashes (-), dots (.), and - // alphanumerics between. This field is REQUIRED. - string name = 1; - - // This field is REQUIRED. Value of this field is opaque to the CO. - string vendor_version = 2; - - // This field is OPTIONAL. Values are opaque to the CO. - map manifest = 3; -} -``` - -##### GetPluginInfo Errors - -If the plugin is unable to complete the GetPluginInfo call successfully, it MUST return a non-ok gRPC code in the gRPC status. - -#### `GetPluginCapabilities` - -This REQUIRED RPC allows the CO to query the supported capabilities of the Plugin "as a whole": it is the grand sum of all capabilities of all instances of the Plugin software, as it is intended to be deployed. -All instances of the same version (see `vendor_version` of `GetPluginInfoResponse`) of the Plugin SHALL return the same set of capabilities, regardless of both: (a) where instances are deployed on the cluster as well as; (b) which RPCs an instance is serving. - -```protobuf -message GetPluginCapabilitiesRequest { - // Intentionally empty. -} - -message GetPluginCapabilitiesResponse { - // All the capabilities that the controller service supports. This - // field is OPTIONAL. - repeated PluginCapability capabilities = 1; -} - -// Specifies a capability of the plugin. -message PluginCapability { - message Service { - enum Type { - UNKNOWN = 0; - // CONTROLLER_SERVICE indicates that the Plugin provides RPCs for - // the ControllerService. Plugins SHOULD provide this capability. - // In rare cases certain plugins MAY wish to omit the - // ControllerService entirely from their implementation, but such - // SHOULD NOT be the common case. - // The presence of this capability determines whether the CO will - // attempt to invoke the REQUIRED ControllerService RPCs, as well - // as specific RPCs as indicated by ControllerGetCapabilities. - CONTROLLER_SERVICE = 1; - - // VOLUME_ACCESSIBILITY_CONSTRAINTS indicates that the volumes for - // this plugin MAY NOT be equally accessible by all nodes in the - // cluster. The CO MUST use the topology information returned by - // CreateVolumeRequest along with the topology information - // returned by NodeGetInfo to ensure that a given volume is - // accessible from a given node when scheduling workloads. - VOLUME_ACCESSIBILITY_CONSTRAINTS = 2; - } - Type type = 1; - } - - message VolumeExpansion { - enum Type { - UNKNOWN = 0; - - // ONLINE indicates that volumes may be expanded when published to - // a node. When a Plugin implements this capability it MUST - // implement either the EXPAND_VOLUME controller capability or the - // EXPAND_VOLUME node capability or both. When a plugin supports - // ONLINE volume expansion and also has the EXPAND_VOLUME - // controller capability then the plugin MUST support expansion of - // volumes currently published and available on a node. When a - // plugin supports ONLINE volume expansion and also has the - // EXPAND_VOLUME node capability then the plugin MAY support - // expansion of node-published volume via NodeExpandVolume. - // - // Example 1: Given a shared filesystem volume (e.g. GlusterFs), - // the Plugin may set the ONLINE volume expansion capability and - // implement ControllerExpandVolume but not NodeExpandVolume. - // - // Example 2: Given a block storage volume type (e.g. EBS), the - // Plugin may set the ONLINE volume expansion capability and - // implement both ControllerExpandVolume and NodeExpandVolume. - // - // Example 3: Given a Plugin that supports volume expansion only - // upon a node, the Plugin may set the ONLINE volume - // expansion capability and implement NodeExpandVolume but not - // ControllerExpandVolume. - ONLINE = 1; - - // OFFLINE indicates that volumes currently published and - // available on a node SHALL NOT be expanded via - // ControllerExpandVolume. When a plugin supports OFFLINE volume - // expansion it MUST implement either the EXPAND_VOLUME controller - // capability or both the EXPAND_VOLUME controller capability and - // the EXPAND_VOLUME node capability. - // - // Example 1: Given a block storage volume type (e.g. Azure Disk) - // that does not support expansion of "node-attached" (i.e. - // controller-published) volumes, the Plugin may indicate - // OFFLINE volume expansion support and implement both - // ControllerExpandVolume and NodeExpandVolume. - OFFLINE = 2; - } - Type type = 1; - } - - oneof type { - // Service that the plugin supports. - Service service = 1; - VolumeExpansion volume_expansion = 2; - } -} -``` - -##### GetPluginCapabilities Errors - -If the plugin is unable to complete the GetPluginCapabilities call successfully, it MUST return a non-ok gRPC code in the gRPC status. - -#### `Probe` - -A Plugin MUST implement this RPC call. -The primary utility of the Probe RPC is to verify that the plugin is in a healthy and ready state. -If an unhealthy state is reported, via a non-success response, a CO MAY take action with the intent to bring the plugin to a healthy state. -Such actions MAY include, but SHALL NOT be limited to, the following: - -* Restarting the plugin container, or -* Notifying the plugin supervisor. - -The Plugin MAY verify that it has the right configurations, devices, dependencies and drivers in order to run and return a success if the validation succeeds. -The CO MAY invoke this RPC at any time. -A CO MAY invoke this call multiple times with the understanding that a plugin's implementation MAY NOT be trivial and there MAY be overhead incurred by such repeated calls. -The SP SHALL document guidance and known limitations regarding a particular Plugin's implementation of this RPC. -For example, the SP MAY document the maximum frequency at which its Probe implementation SHOULD be called. - -```protobuf -message ProbeRequest { - // Intentionally empty. -} - -message ProbeResponse { - // Readiness allows a plugin to report its initialization status back - // to the CO. Initialization for some plugins MAY be time consuming - // and it is important for a CO to distinguish between the following - // cases: - // - // 1) The plugin is in an unhealthy state and MAY need restarting. In - // this case a gRPC error code SHALL be returned. - // 2) The plugin is still initializing, but is otherwise perfectly - // healthy. In this case a successful response SHALL be returned - // with a readiness value of `false`. Calls to the plugin's - // Controller and/or Node services MAY fail due to an incomplete - // initialization state. - // 3) The plugin has finished initializing and is ready to service - // calls to its Controller and/or Node services. A successful - // response is returned with a readiness value of `true`. - // - // This field is OPTIONAL. If not present, the caller SHALL assume - // that the plugin is in a ready state and is accepting calls to its - // Controller and/or Node services (according to the plugin's reported - // capabilities). - .google.protobuf.BoolValue ready = 1; -} -``` - -##### Probe Errors - -If the plugin is unable to complete the Probe call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Plugin not healthy | 9 FAILED_PRECONDITION | Indicates that the plugin is not in a healthy/ready state. | Caller SHOULD assume the plugin is not healthy and that future RPCs MAY fail because of this condition. | -| Missing required dependency | 9 FAILED_PRECONDITION | Indicates that the plugin is missing one or more required dependency. | Caller MUST assume the plugin is not healthy. | - - -### Controller Service RPC - -#### `CreateVolume` - -A Controller Plugin MUST implement this RPC call if it has `CREATE_DELETE_VOLUME` controller capability. -This RPC will be called by the CO to provision a new volume on behalf of a user (to be consumed as either a block device or a mounted filesystem). - -This operation MUST be idempotent. -If a volume corresponding to the specified volume `name` already exists, is accessible from `accessibility_requirements`, and is compatible with the specified `capacity_range`, `volume_capabilities` and `parameters` in the `CreateVolumeRequest`, the Plugin MUST reply `0 OK` with the corresponding `CreateVolumeResponse`. - -Plugins MAY create 3 types of volumes: - -- Empty volumes. When plugin supports `CREATE_DELETE_VOLUME` OPTIONAL capability. -- From an existing snapshot. When plugin supports `CREATE_DELETE_VOLUME` and `CREATE_DELETE_SNAPSHOT` OPTIONAL capabilities. -- From an existing volume. When plugin supports cloning, and reports the OPTIONAL capabilities `CREATE_DELETE_VOLUME` and `CLONE_VOLUME`. - -```protobuf -message CreateVolumeRequest { - // The suggested name for the storage space. This field is REQUIRED. - // It serves two purposes: - // 1) Idempotency - This name is generated by the CO to achieve - // idempotency. The Plugin SHOULD ensure that multiple - // `CreateVolume` calls for the same name do not result in more - // than one piece of storage provisioned corresponding to that - // name. If a Plugin is unable to enforce idempotency, the CO's - // error recovery logic could result in multiple (unused) volumes - // being provisioned. - // In the case of error, the CO MUST handle the gRPC error codes - // per the recovery behavior defined in the "CreateVolume Errors" - // section below. - // The CO is responsible for cleaning up volumes it provisioned - // that it no longer needs. If the CO is uncertain whether a volume - // was provisioned or not when a `CreateVolume` call fails, the CO - // MAY call `CreateVolume` again, with the same name, to ensure the - // volume exists and to retrieve the volume's `volume_id` (unless - // otherwise prohibited by "CreateVolume Errors"). - // 2) Suggested name - Some storage systems allow callers to specify - // an identifier by which to refer to the newly provisioned - // storage. If a storage system supports this, it can optionally - // use this name as the identifier for the new volume. - // Any Unicode string that conforms to the length limit is allowed - // except those containing the following banned characters: - // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. - // (These are control characters other than commonly used whitespace.) - string name = 1; - - // This field is OPTIONAL. This allows the CO to specify the capacity - // requirement of the volume to be provisioned. If not specified, the - // Plugin MAY choose an implementation-defined capacity range. If - // specified it MUST always be honored, even when creating volumes - // from a source; which MAY force some backends to internally extend - // the volume after creating it. - CapacityRange capacity_range = 2; - - // The capabilities that the provisioned volume MUST have. SP MUST - // provision a volume that will satisfy ALL of the capabilities - // specified in this list. Otherwise SP MUST return the appropriate - // gRPC error code. - // The Plugin MUST assume that the CO MAY use the provisioned volume - // with ANY of the capabilities specified in this list. - // For example, a CO MAY specify two volume capabilities: one with - // access mode SINGLE_NODE_WRITER and another with access mode - // MULTI_NODE_READER_ONLY. In this case, the SP MUST verify that the - // provisioned volume can be used in either mode. - // This also enables the CO to do early validation: If ANY of the - // specified volume capabilities are not supported by the SP, the call - // MUST return the appropriate gRPC error code. - // This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 3; - - // Plugin specific parameters passed in as opaque key-value pairs. - // This field is OPTIONAL. The Plugin is responsible for parsing and - // validating these parameters. COs will treat these as opaque. - map parameters = 4; - - // Secrets required by plugin to complete volume creation request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 5 [(csi_secret) = true]; - - // If specified, the new volume will be pre-populated with data from - // this source. This field is OPTIONAL. - VolumeContentSource volume_content_source = 6; - - // Specifies where (regions, zones, racks, etc.) the provisioned - // volume MUST be accessible from. - // An SP SHALL advertise the requirements for topological - // accessibility information in documentation. COs SHALL only specify - // topological accessibility information supported by the SP. - // This field is OPTIONAL. - // This field SHALL NOT be specified unless the SP has the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. - // If this field is not specified and the SP has the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY - // choose where the provisioned volume is accessible from. - TopologyRequirement accessibility_requirements = 7; -} - -// Specifies what source the volume will be created from. One of the -// type fields MUST be specified. -message VolumeContentSource { - message SnapshotSource { - // Contains identity information for the existing source snapshot. - // This field is REQUIRED. Plugin is REQUIRED to support creating - // volume from snapshot if it supports the capability - // CREATE_DELETE_SNAPSHOT. - string snapshot_id = 1; - } - - message VolumeSource { - // Contains identity information for the existing source volume. - // This field is REQUIRED. Plugins reporting CLONE_VOLUME - // capability MUST support creating a volume from another volume. - string volume_id = 1; - } - - oneof type { - SnapshotSource snapshot = 1; - VolumeSource volume = 2; - } -} - -message CreateVolumeResponse { - // Contains all attributes of the newly created volume that are - // relevant to the CO along with information required by the Plugin - // to uniquely identify the volume. This field is REQUIRED. - Volume volume = 1; -} - -// Specify a capability of a volume. -message VolumeCapability { - // Indicate that the volume will be accessed via the block device API. - message BlockVolume { - // Intentionally empty, for now. - } - - // Indicate that the volume will be accessed via the filesystem API. - message MountVolume { - // The filesystem type. This field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string fs_type = 1; - - // The mount options that can be used for the volume. This field is - // OPTIONAL. `mount_flags` MAY contain sensitive information. - // Therefore, the CO and the Plugin MUST NOT leak this information - // to untrusted entities. The total size of this repeated field - // SHALL NOT exceed 4 KiB. - repeated string mount_flags = 2; - } - - // Specify how a volume can be accessed. - message AccessMode { - enum Mode { - UNKNOWN = 0; - - // Can only be published once as read/write on a single node, at - // any given time. - SINGLE_NODE_WRITER = 1; - - // Can only be published once as readonly on a single node, at - // any given time. - SINGLE_NODE_READER_ONLY = 2; - - // Can be published as readonly at multiple nodes simultaneously. - MULTI_NODE_READER_ONLY = 3; - - // Can be published at multiple nodes simultaneously. Only one of - // the node can be used as read/write. The rest will be readonly. - MULTI_NODE_SINGLE_WRITER = 4; - - // Can be published as read/write at multiple nodes - // simultaneously. - MULTI_NODE_MULTI_WRITER = 5; - } - - // This field is REQUIRED. - Mode mode = 1; - } - - // Specifies what API the volume will be accessed using. One of the - // following fields MUST be specified. - oneof access_type { - BlockVolume block = 1; - MountVolume mount = 2; - } - - // This is a REQUIRED field. - AccessMode access_mode = 3; -} - -// The capacity of the storage space in bytes. To specify an exact size, -// `required_bytes` and `limit_bytes` SHALL be set to the same value. At -// least one of the these fields MUST be specified. -message CapacityRange { - // Volume MUST be at least this big. This field is OPTIONAL. - // A value of 0 is equal to an unspecified field value. - // The value of this field MUST NOT be negative. - int64 required_bytes = 1; - - // Volume MUST not be bigger than this. This field is OPTIONAL. - // A value of 0 is equal to an unspecified field value. - // The value of this field MUST NOT be negative. - int64 limit_bytes = 2; -} - -// Information about a specific volume. -message Volume { - // The capacity of the volume in bytes. This field is OPTIONAL. If not - // set (value of 0), it indicates that the capacity of the volume is - // unknown (e.g., NFS share). - // The value of this field MUST NOT be negative. - int64 capacity_bytes = 1; - - // The identifier for this volume, generated by the plugin. - // This field is REQUIRED. - // This field MUST contain enough information to uniquely identify - // this specific volume vs all other volumes supported by this plugin. - // This field SHALL be used by the CO in subsequent calls to refer to - // this volume. - // The SP is NOT responsible for global uniqueness of volume_id across - // multiple SPs. - string volume_id = 2; - - // Opaque static properties of the volume. SP MAY use this field to - // ensure subsequent volume validation and publishing calls have - // contextual information. - // The contents of this field SHALL be opaque to a CO. - // The contents of this field SHALL NOT be mutable. - // The contents of this field SHALL be safe for the CO to cache. - // The contents of this field SHOULD NOT contain sensitive - // information. - // The contents of this field SHOULD NOT be used for uniquely - // identifying a volume. The `volume_id` alone SHOULD be sufficient to - // identify the volume. - // A volume uniquely identified by `volume_id` SHALL always report the - // same volume_context. - // This field is OPTIONAL and when present MUST be passed to volume - // validation and publishing calls. - map volume_context = 3; - - // If specified, indicates that the volume is not empty and is - // pre-populated with data from the specified source. - // This field is OPTIONAL. - VolumeContentSource content_source = 4; - - // Specifies where (regions, zones, racks, etc.) the provisioned - // volume is accessible from. - // A plugin that returns this field MUST also set the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. - // An SP MAY specify multiple topologies to indicate the volume is - // accessible from multiple locations. - // COs MAY use this information along with the topology information - // returned by NodeGetInfo to ensure that a given volume is accessible - // from a given node when scheduling workloads. - // This field is OPTIONAL. If it is not specified, the CO MAY assume - // the volume is equally accessible from all nodes in the cluster and - // MAY schedule workloads referencing the volume on any available - // node. - // - // Example 1: - // accessible_topology = {"region": "R1", "zone": "Z2"} - // Indicates a volume accessible only from the "region" "R1" and the - // "zone" "Z2". - // - // Example 2: - // accessible_topology = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"} - // Indicates a volume accessible from both "zone" "Z2" and "zone" "Z3" - // in the "region" "R1". - repeated Topology accessible_topology = 5; -} - -message TopologyRequirement { - // Specifies the list of topologies the provisioned volume MUST be - // accessible from. - // This field is OPTIONAL. If TopologyRequirement is specified either - // requisite or preferred or both MUST be specified. - // - // If requisite is specified, the provisioned volume MUST be - // accessible from at least one of the requisite topologies. - // - // Given - // x = number of topologies provisioned volume is accessible from - // n = number of requisite topologies - // The CO MUST ensure n >= 1. The SP MUST ensure x >= 1 - // If x==n, then the SP MUST make the provisioned volume available to - // all topologies from the list of requisite topologies. If it is - // unable to do so, the SP MUST fail the CreateVolume call. - // For example, if a volume should be accessible from a single zone, - // and requisite = - // {"region": "R1", "zone": "Z2"} - // then the provisioned volume MUST be accessible from the "region" - // "R1" and the "zone" "Z2". - // Similarly, if a volume should be accessible from two zones, and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"} - // then the provisioned volume MUST be accessible from the "region" - // "R1" and both "zone" "Z2" and "zone" "Z3". - // - // If xn, then the SP MUST make the provisioned volume available from - // all topologies from the list of requisite topologies and MAY choose - // the remaining x-n unique topologies from the list of all possible - // topologies. If it is unable to do so, the SP MUST fail the - // CreateVolume call. - // For example, if a volume should be accessible from two zones, and - // requisite = - // {"region": "R1", "zone": "Z2"} - // then the provisioned volume MUST be accessible from the "region" - // "R1" and the "zone" "Z2" and the SP may select the second zone - // independently, e.g. "R1/Z4". - repeated Topology requisite = 1; - - // Specifies the list of topologies the CO would prefer the volume to - // be provisioned in. - // - // This field is OPTIONAL. If TopologyRequirement is specified either - // requisite or preferred or both MUST be specified. - // - // An SP MUST attempt to make the provisioned volume available using - // the preferred topologies in order from first to last. - // - // If requisite is specified, all topologies in preferred list MUST - // also be present in the list of requisite topologies. - // - // If the SP is unable to to make the provisioned volume available - // from any of the preferred topologies, the SP MAY choose a topology - // from the list of requisite topologies. - // If the list of requisite topologies is not specified, then the SP - // MAY choose from the list of all possible topologies. - // If the list of requisite topologies is specified and the SP is - // unable to to make the provisioned volume available from any of the - // requisite topologies it MUST fail the CreateVolume call. - // - // Example 1: - // Given a volume should be accessible from a single zone, and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"} - // preferred = - // {"region": "R1", "zone": "Z3"} - // then the the SP SHOULD first attempt to make the provisioned volume - // available from "zone" "Z3" in the "region" "R1" and fall back to - // "zone" "Z2" in the "region" "R1" if that is not possible. - // - // Example 2: - // Given a volume should be accessible from a single zone, and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"}, - // {"region": "R1", "zone": "Z4"}, - // {"region": "R1", "zone": "Z5"} - // preferred = - // {"region": "R1", "zone": "Z4"}, - // {"region": "R1", "zone": "Z2"} - // then the the SP SHOULD first attempt to make the provisioned volume - // accessible from "zone" "Z4" in the "region" "R1" and fall back to - // "zone" "Z2" in the "region" "R1" if that is not possible. If that - // is not possible, the SP may choose between either the "zone" - // "Z3" or "Z5" in the "region" "R1". - // - // Example 3: - // Given a volume should be accessible from TWO zones (because an - // opaque parameter in CreateVolumeRequest, for example, specifies - // the volume is accessible from two zones, aka synchronously - // replicated), and - // requisite = - // {"region": "R1", "zone": "Z2"}, - // {"region": "R1", "zone": "Z3"}, - // {"region": "R1", "zone": "Z4"}, - // {"region": "R1", "zone": "Z5"} - // preferred = - // {"region": "R1", "zone": "Z5"}, - // {"region": "R1", "zone": "Z3"} - // then the the SP SHOULD first attempt to make the provisioned volume - // accessible from the combination of the two "zones" "Z5" and "Z3" in - // the "region" "R1". If that's not possible, it should fall back to - // a combination of "Z5" and other possibilities from the list of - // requisite. If that's not possible, it should fall back to a - // combination of "Z3" and other possibilities from the list of - // requisite. If that's not possible, it should fall back to a - // combination of other possibilities from the list of requisite. - repeated Topology preferred = 2; -} - -// Topology is a map of topological domains to topological segments. -// A topological domain is a sub-division of a cluster, like "region", -// "zone", "rack", etc. -// A topological segment is a specific instance of a topological domain, -// like "zone3", "rack3", etc. -// For example {"com.company/zone": "Z1", "com.company/rack": "R3"} -// Valid keys have two segments: an OPTIONAL prefix and name, separated -// by a slash (/), for example: "com.company.example/zone". -// The key name segment is REQUIRED. The prefix is OPTIONAL. -// The key name MUST be 63 characters or less, begin and end with an -// alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-), -// underscores (_), dots (.), or alphanumerics in between, for example -// "zone". -// The key prefix MUST be 63 characters or less, begin and end with a -// lower-case alphanumeric character ([a-z0-9]), contain only -// dashes (-), dots (.), or lower-case alphanumerics in between, and -// follow domain name notation format -// (https://tools.ietf.org/html/rfc1035#section-2.3.1). -// The key prefix SHOULD include the plugin's host company name and/or -// the plugin name, to minimize the possibility of collisions with keys -// from other plugins. -// If a key prefix is specified, it MUST be identical across all -// topology keys returned by the SP (across all RPCs). -// Keys MUST be case-insensitive. Meaning the keys "Zone" and "zone" -// MUST not both exist. -// Each value (topological segment) MUST contain 1 or more strings. -// Each string MUST be 63 characters or less and begin and end with an -// alphanumeric character with '-', '_', '.', or alphanumerics in -// between. -message Topology { - map segments = 1; -} -``` - -##### CreateVolume Errors - -If the plugin is unable to complete the CreateVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Source incompatible or not supported | 3 INVALID_ARGUMENT | Besides the general cases, this code MUST also be used to indicate when plugin supporting CREATE_DELETE_VOLUME cannot create a volume from the requested source (`SnapshotSource` or `VolumeSource`). Failure MAY be caused by not supporting the source (CO SHOULD NOT have provided that source) or incompatibility between `parameters` from the source and the ones requested for the new volume. More human-readable information SHOULD be provided in the gRPC `status.message` field if the problem is the source. | On source related issues, caller MUST use different parameters, a different source, or no source at all. | -| Source does not exist | 5 NOT_FOUND | Indicates that the specified source does not exist. | Caller MUST verify that the `volume_content_source` is correct, the source is accessible, and has not been deleted before retrying with exponential back off. | -| Volume already exists but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified volume `name` already exists but is incompatible with the specified `capacity_range`, `volume_capabilities` or `parameters`. | Caller MUST fix the arguments or use a different `name` before retrying. | -| Unable to provision in `accessible_topology` | 8 RESOURCE_EXHAUSTED | Indicates that although the `accessible_topology` field is valid, a new volume can not be provisioned with the specified topology constraints. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST ensure that whatever is preventing volumes from being provisioned in the specified location (e.g. quota issues) is addressed before retrying with exponential backoff. | -| Unsupported `capacity_range` | 11 OUT_OF_RANGE | Indicates that the capacity range is not allowed by the Plugin, for example when trying to create a volume smaller than the source snapshot. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the capacity range before retrying. | - - -#### `DeleteVolume` - -A Controller Plugin MUST implement this RPC call if it has `CREATE_DELETE_VOLUME` capability. -This RPC will be called by the CO to deprovision a volume. - -This operation MUST be idempotent. -If a volume corresponding to the specified `volume_id` does not exist or the artifacts associated with the volume do not exist anymore, the Plugin MUST reply `0 OK`. - -```protobuf -message DeleteVolumeRequest { - // The ID of the volume to be deprovisioned. - // This field is REQUIRED. - string volume_id = 1; - - // Secrets required by plugin to complete volume deletion request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 2 [(csi_secret) = true]; -} - -message DeleteVolumeResponse { - // Intentionally empty. -} -``` - -##### DeleteVolume Errors - -If the plugin is unable to complete the DeleteVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be deleted because it is in use by another resource. | Caller SHOULD ensure that there are no other resources using the volume, and then retry with exponential back off. | - - -#### `ControllerPublishVolume` - -A Controller Plugin MUST implement this RPC call if it has `PUBLISH_UNPUBLISH_VOLUME` controller capability. -This RPC will be called by the CO when it wants to place a workload that uses the volume onto a node. -The Plugin SHOULD perform the work that is necessary for making the volume available on the given node. -The Plugin MUST NOT assume that this RPC will be executed on the node where the volume will be used. - -This operation MUST be idempotent. -If the volume corresponding to the `volume_id` has already been published at the node corresponding to the `node_id`, and is compatible with the specified `volume_capability` and `readonly` flag, the Plugin MUST reply `0 OK`. - -If the operation failed or the CO does not know if the operation has failed or not, it MAY choose to call `ControllerPublishVolume` again or choose to call `ControllerUnpublishVolume`. - -The CO MAY call this RPC for publishing a volume to multiple nodes if the volume has `MULTI_NODE` capability (i.e., `MULTI_NODE_READER_ONLY`, `MULTI_NODE_SINGLE_WRITER` or `MULTI_NODE_MULTI_WRITER`). - -```protobuf -message ControllerPublishVolumeRequest { - // The ID of the volume to be used on a node. - // This field is REQUIRED. - string volume_id = 1; - - // The ID of the node. This field is REQUIRED. The CO SHALL set this - // field to match the node ID returned by `NodeGetInfo`. - string node_id = 2; - - // Volume capability describing how the CO intends to use this volume. - // SP MUST ensure the CO can use the published volume as described. - // Otherwise SP MUST return the appropriate gRPC error code. - // This is a REQUIRED field. - VolumeCapability volume_capability = 3; - - // Indicates SP MUST publish the volume in readonly mode. - // CO MUST set this field to false if SP does not have the - // PUBLISH_READONLY controller capability. - // This is a REQUIRED field. - bool readonly = 4; - - // Secrets required by plugin to complete controller publish volume - // request. This field is OPTIONAL. Refer to the - // `Secrets Requirements` section on how to use this field. - map secrets = 5 [(csi_secret) = true]; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 6; -} - -message ControllerPublishVolumeResponse { - // Opaque static publish properties of the volume. SP MAY use this - // field to ensure subsequent `NodeStageVolume` or `NodePublishVolume` - // calls calls have contextual information. - // The contents of this field SHALL be opaque to a CO. - // The contents of this field SHALL NOT be mutable. - // The contents of this field SHALL be safe for the CO to cache. - // The contents of this field SHOULD NOT contain sensitive - // information. - // The contents of this field SHOULD NOT be used for uniquely - // identifying a volume. The `volume_id` alone SHOULD be sufficient to - // identify the volume. - // This field is OPTIONAL and when present MUST be passed to - // subsequent `NodeStageVolume` or `NodePublishVolume` calls - map publish_context = 1; -} -``` - -##### ControllerPublishVolume Errors - -If the plugin is unable to complete the ControllerPublishVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | -| Node does not exist | 5 NOT_FOUND | Indicates that a node corresponding to the specified `node_id` does not exist. | Caller MUST verify that the `node_id` is correct and that the node is available and has not been terminated or deleted before retrying with exponential backoff. | -| Volume published but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified `volume_id` has already been published at the node corresponding to the specified `node_id` but is incompatible with the specified `volume_capability` or `readonly` flag . | Caller MUST fix the arguments before retrying. | -| Volume published to another node | 9 FAILED_PRECONDITION | Indicates that a volume corresponding to the specified `volume_id` has already been published at another node and does not have MULTI_NODE volume capability. If this error code is returned, the Plugin SHOULD specify the `node_id` of the node at which the volume is published as part of the gRPC `status.message`. | Caller SHOULD ensure the specified volume is not published at any other node before retrying with exponential back off. | -| Max volumes attached | 8 RESOURCE_EXHAUSTED | Indicates that the maximum supported number of volumes that can be attached to the specified node are already attached. Therefore, this operation will fail until at least one of the existing attached volumes is detached from the node. | Caller MUST ensure that the number of volumes already attached to the node is less then the maximum supported number of volumes before retrying with exponential backoff. | - -#### `ControllerUnpublishVolume` - -Controller Plugin MUST implement this RPC call if it has `PUBLISH_UNPUBLISH_VOLUME` controller capability. -This RPC is a reverse operation of `ControllerPublishVolume`. -It MUST be called after all `NodeUnstageVolume` and `NodeUnpublishVolume` on the volume are called and succeed. -The Plugin SHOULD perform the work that is necessary for making the volume ready to be consumed by a different node. -The Plugin MUST NOT assume that this RPC will be executed on the node where the volume was previously used. - -This RPC is typically called by the CO when the workload using the volume is being moved to a different node, or all the workload using the volume on a node has finished. - -This operation MUST be idempotent. -If the volume corresponding to the `volume_id` is not attached to the node corresponding to the `node_id`, the Plugin MUST reply `0 OK`. -If this operation failed, or the CO does not know if the operation failed or not, it can choose to call `ControllerUnpublishVolume` again. - -```protobuf -message ControllerUnpublishVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The ID of the node. This field is OPTIONAL. The CO SHOULD set this - // field to match the node ID returned by `NodeGetInfo` or leave it - // unset. If the value is set, the SP MUST unpublish the volume from - // the specified node. If the value is unset, the SP MUST unpublish - // the volume from all nodes it is published to. - string node_id = 2; - - // Secrets required by plugin to complete controller unpublish volume - // request. This SHOULD be the same secrets passed to the - // ControllerPublishVolume call for the specified volume. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 3 [(csi_secret) = true]; -} - -message ControllerUnpublishVolumeResponse { - // Intentionally empty. -} -``` - -##### ControllerUnpublishVolume Errors - -If the plugin is unable to complete the ControllerUnpublishVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | -| Node does not exist | 5 NOT_FOUND | Indicates that a node corresponding to the specified `node_id` does not exist. | Caller MUST verify that the `node_id` is correct and that the node is available and has not been terminated or deleted before retrying with exponential backoff. | - - -#### `ValidateVolumeCapabilities` - -A Controller Plugin MUST implement this RPC call. -This RPC will be called by the CO to check if a pre-provisioned volume has all the capabilities that the CO wants. -This RPC call SHALL return `confirmed` only if all the volume capabilities specified in the request are supported (see caveat below). -This operation MUST be idempotent. - -NOTE: Older plugins will parse but likely not "process" newer fields that MAY be present in capability-validation messages (and sub-messages) sent by a CO that is communicating using a newer, backwards-compatible version of the CSI protobufs. -Therefore, the CO SHALL reconcile successful capability-validation responses by comparing the validated capabilities with those that it had originally requested. - -```protobuf -message ValidateVolumeCapabilitiesRequest { - // The ID of the volume to check. This field is REQUIRED. - string volume_id = 1; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 2; - - // The capabilities that the CO wants to check for the volume. This - // call SHALL return "confirmed" only if all the volume capabilities - // specified below are supported. This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 3; - - // See CreateVolumeRequest.parameters. - // This field is OPTIONAL. - map parameters = 4; - - // Secrets required by plugin to complete volume validation request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 5 [(csi_secret) = true]; -} - -message ValidateVolumeCapabilitiesResponse { - message Confirmed { - // Volume context validated by the plugin. - // This field is OPTIONAL. - map volume_context = 1; - - // Volume capabilities supported by the plugin. - // This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 2; - - // The volume creation parameters validated by the plugin. - // This field is OPTIONAL. - map parameters = 3; - } - - // Confirmed indicates to the CO the set of capabilities that the - // plugin has validated. This field SHALL only be set to a non-empty - // value for successful validation responses. - // For successful validation responses, the CO SHALL compare the - // fields of this message to the originally requested capabilities in - // order to guard against an older plugin reporting "valid" for newer - // capability fields that it does not yet understand. - // This field is OPTIONAL. - Confirmed confirmed = 1; - - // Message to the CO if `confirmed` above is empty. This field is - // OPTIONAL. - // An empty string is equal to an unspecified field value. - string message = 2; -} -``` - -##### ValidateVolumeCapabilities Errors - -If the plugin is unable to complete the ValidateVolumeCapabilities call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | - - -#### `ListVolumes` - -A Controller Plugin MUST implement this RPC call if it has `LIST_VOLUMES` capability. -The Plugin SHALL return the information about all the volumes that it knows about. -If volumes are created and/or deleted while the CO is concurrently paging through `ListVolumes` results then it is possible that the CO MAY either witness duplicate volumes in the list, not witness existing volumes, or both. -The CO SHALL NOT expect a consistent "view" of all volumes when paging through the volume list via multiple calls to `ListVolumes`. - -```protobuf -message ListVolumesRequest { - // If specified (non-zero value), the Plugin MUST NOT return more - // entries than this number in the response. If the actual number of - // entries is more than this number, the Plugin MUST set `next_token` - // in the response which can be used to get the next page of entries - // in the subsequent `ListVolumes` call. This field is OPTIONAL. If - // not specified (zero value), it means there is no restriction on the - // number of entries that can be returned. - // The value of this field MUST NOT be negative. - int32 max_entries = 1; - - // A token to specify where to start paginating. Set this field to - // `next_token` returned by a previous `ListVolumes` call to get the - // next page of entries. This field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string starting_token = 2; -} - -message ListVolumesResponse { - message Entry { - Volume volume = 1; - } - - repeated Entry entries = 1; - - // This token allows you to get the next page of entries for - // `ListVolumes` request. If the number of entries is larger than - // `max_entries`, use the `next_token` as a value for the - // `starting_token` field in the next `ListVolumes` request. This - // field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string next_token = 2; -} -``` - -##### ListVolumes Errors - -If the plugin is unable to complete the ListVolumes call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Invalid `starting_token` | 10 ABORTED | Indicates that `starting_token` is not valid. | Caller SHOULD start the `ListVolumes` operation again with an empty `starting_token`. | - - -#### `GetCapacity` - -A Controller Plugin MUST implement this RPC call if it has `GET_CAPACITY` controller capability. -The RPC allows the CO to query the capacity of the storage pool from which the controller provisions volumes. - -```protobuf -message GetCapacityRequest { - // If specified, the Plugin SHALL report the capacity of the storage - // that can be used to provision volumes that satisfy ALL of the - // specified `volume_capabilities`. These are the same - // `volume_capabilities` the CO will use in `CreateVolumeRequest`. - // This field is OPTIONAL. - repeated VolumeCapability volume_capabilities = 1; - - // If specified, the Plugin SHALL report the capacity of the storage - // that can be used to provision volumes with the given Plugin - // specific `parameters`. These are the same `parameters` the CO will - // use in `CreateVolumeRequest`. This field is OPTIONAL. - map parameters = 2; - - // If specified, the Plugin SHALL report the capacity of the storage - // that can be used to provision volumes that in the specified - // `accessible_topology`. This is the same as the - // `accessible_topology` the CO returns in a `CreateVolumeResponse`. - // This field is OPTIONAL. This field SHALL NOT be set unless the - // plugin advertises the VOLUME_ACCESSIBILITY_CONSTRAINTS capability. - Topology accessible_topology = 3; -} - -message GetCapacityResponse { - // The available capacity, in bytes, of the storage that can be used - // to provision volumes. If `volume_capabilities` or `parameters` is - // specified in the request, the Plugin SHALL take those into - // consideration when calculating the available capacity of the - // storage. This field is REQUIRED. - // The value of this field MUST NOT be negative. - int64 available_capacity = 1; -} -``` - -##### GetCapacity Errors - -If the plugin is unable to complete the GetCapacity call successfully, it MUST return a non-ok gRPC code in the gRPC status. - -#### `ControllerGetCapabilities` - -A Controller Plugin MUST implement this RPC call. This RPC allows the CO to check the supported capabilities of controller service provided by the Plugin. - -```protobuf -message ControllerGetCapabilitiesRequest { - // Intentionally empty. -} - -message ControllerGetCapabilitiesResponse { - // All the capabilities that the controller service supports. This - // field is OPTIONAL. - repeated ControllerServiceCapability capabilities = 1; -} - -// Specifies a capability of the controller service. -message ControllerServiceCapability { - message RPC { - enum Type { - UNKNOWN = 0; - CREATE_DELETE_VOLUME = 1; - PUBLISH_UNPUBLISH_VOLUME = 2; - LIST_VOLUMES = 3; - GET_CAPACITY = 4; - // Currently the only way to consume a snapshot is to create - // a volume from it. Therefore plugins supporting - // CREATE_DELETE_SNAPSHOT MUST support creating volume from - // snapshot. - CREATE_DELETE_SNAPSHOT = 5; - LIST_SNAPSHOTS = 6; - - // Plugins supporting volume cloning at the storage level MAY - // report this capability. The source volume MUST be managed by - // the same plugin. Not all volume sources and parameters - // combinations MAY work. - CLONE_VOLUME = 7; - - // Indicates the SP supports ControllerPublishVolume.readonly - // field. - PUBLISH_READONLY = 8; - - // See VolumeExpansion for details. - EXPAND_VOLUME = 9; - } - - Type type = 1; - } - - oneof type { - // RPC that the controller supports. - RPC rpc = 1; - } -} -``` - -##### ControllerGetCapabilities Errors - -If the plugin is unable to complete the ControllerGetCapabilities call successfully, it MUST return a non-ok gRPC code in the gRPC status. - -#### `CreateSnapshot` - -A Controller Plugin MUST implement this RPC call if it has `CREATE_DELETE_SNAPSHOT` controller capability. -This RPC will be called by the CO to create a new snapshot from a source volume on behalf of a user. - -This operation MUST be idempotent. -If a snapshot corresponding to the specified snapshot `name` is successfully cut and ready to use (meaning it MAY be specified as a `volume_content_source` in a `CreateVolumeRequest`), the Plugin MUST reply `0 OK` with the corresponding `CreateSnapshotResponse`. - -If an error occurs before a snapshot is cut, `CreateSnapshot` SHOULD return a corresponding gRPC error code that reflects the error condition. - -For plugins that supports snapshot post processing such as uploading, `CreateSnapshot` SHOULD return `0 OK` and `ready_to_use` SHOULD be set to `false` after the snapshot is cut but still being processed. -CO SHOULD then reissue the same `CreateSnapshotRequest` periodically until boolean `ready_to_use` flips to `true` indicating the snapshot has been "processed" and is ready to use to create new volumes. -If an error occurs during the process, `CreateSnapshot` SHOULD return a corresponding gRPC error code that reflects the error condition. - -A snapshot MAY be used as the source to provision a new volume. -A CreateVolumeRequest message MAY specify an OPTIONAL source snapshot parameter. -Reverting a snapshot, where data in the original volume is erased and replaced with data in the snapshot, is an advanced functionality not every storage system can support and therefore is currently out of scope. - -##### The ready_to_use Parameter - -Some SPs MAY "process" the snapshot after the snapshot is cut, for example, maybe uploading the snapshot somewhere after the snapshot is cut. -The post-cut process MAY be a long process that could take hours. -The CO MAY freeze the application using the source volume before taking the snapshot. -The purpose of `freeze` is to ensure the application data is in consistent state. -When `freeze` is performed, the container is paused and the application is also paused. -When `thaw` is performed, the container and the application start running again. -During the snapshot processing phase, since the snapshot is already cut, a `thaw` operation can be performed so application can start running without waiting for the process to complete. -The `ready_to_use` parameter of the snapshot will become `true` after the process is complete. - -For SPs that do not do additional processing after cut, the `ready_to_use` parameter SHOULD be `true` after the snapshot is cut. -`thaw` can be done when the `ready_to_use` parameter is `true` in this case. - -The `ready_to_use` parameter provides guidance to the CO on when it can "thaw" the application in the process of snapshotting. -If the cloud provider or storage system needs to process the snapshot after the snapshot is cut, the `ready_to_use` parameter returned by CreateSnapshot SHALL be `false`. -CO MAY continue to call CreateSnapshot while waiting for the process to complete until `ready_to_use` becomes `true`. -Note that CreateSnapshot no longer blocks after the snapshot is cut. - -A gRPC error code SHALL be returned if an error occurs during any stage of the snapshotting process. -A CO SHOULD explicitly delete snapshots when an error occurs. - -Based on this information, CO can issue repeated (idemponent) calls to CreateSnapshot, monitor the response, and make decisions. -Note that CreateSnapshot is a synchronous call and it MUST block until the snapshot is cut. - -```protobuf -message CreateSnapshotRequest { - // The ID of the source volume to be snapshotted. - // This field is REQUIRED. - string source_volume_id = 1; - - // The suggested name for the snapshot. This field is REQUIRED for - // idempotency. - // Any Unicode string that conforms to the length limit is allowed - // except those containing the following banned characters: - // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. - // (These are control characters other than commonly used whitespace.) - string name = 2; - - // Secrets required by plugin to complete snapshot creation request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 3 [(csi_secret) = true]; - - // Plugin specific parameters passed in as opaque key-value pairs. - // This field is OPTIONAL. The Plugin is responsible for parsing and - // validating these parameters. COs will treat these as opaque. - // Use cases for opaque parameters: - // - Specify a policy to automatically clean up the snapshot. - // - Specify an expiration date for the snapshot. - // - Specify whether the snapshot is readonly or read/write. - // - Specify if the snapshot should be replicated to some place. - // - Specify primary or secondary for replication systems that - // support snapshotting only on primary. - map parameters = 4; -} - -message CreateSnapshotResponse { - // Contains all attributes of the newly created snapshot that are - // relevant to the CO along with information required by the Plugin - // to uniquely identify the snapshot. This field is REQUIRED. - Snapshot snapshot = 1; -} - -// Information about a specific snapshot. -message Snapshot { - // This is the complete size of the snapshot in bytes. The purpose of - // this field is to give CO guidance on how much space is needed to - // create a volume from this snapshot. The size of the volume MUST NOT - // be less than the size of the source snapshot. This field is - // OPTIONAL. If this field is not set, it indicates that this size is - // unknown. The value of this field MUST NOT be negative and a size of - // zero means it is unspecified. - int64 size_bytes = 1; - - // The identifier for this snapshot, generated by the plugin. - // This field is REQUIRED. - // This field MUST contain enough information to uniquely identify - // this specific snapshot vs all other snapshots supported by this - // plugin. - // This field SHALL be used by the CO in subsequent calls to refer to - // this snapshot. - // The SP is NOT responsible for global uniqueness of snapshot_id - // across multiple SPs. - string snapshot_id = 2; - - // Identity information for the source volume. Note that creating a - // snapshot from a snapshot is not supported here so the source has to - // be a volume. This field is REQUIRED. - string source_volume_id = 3; - - // Timestamp when the point-in-time snapshot is taken on the storage - // system. This field is REQUIRED. - .google.protobuf.Timestamp creation_time = 4; - - // Indicates if a snapshot is ready to use as a - // `volume_content_source` in a `CreateVolumeRequest`. The default - // value is false. This field is REQUIRED. - bool ready_to_use = 5; -} -``` - -##### CreateSnapshot Errors - -If the plugin is unable to complete the CreateSnapshot call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Snapshot already exists but is incompatible | 6 ALREADY_EXISTS | Indicates that a snapshot corresponding to the specified snapshot `name` already exists but is incompatible with the specified `volume_id`. | Caller MUST fix the arguments or use a different `name` before retrying. | -| Operation pending for snapshot | 10 ABORTED | Indicates that there is already an operation pending for the specified snapshot. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per snapshot at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same snapshot. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified snapshot, and then retry with exponential back off. | -| Not enough space to create snapshot | 13 RESOURCE_EXHAUSTED | There is not enough space on the storage system to handle the create snapshot request. | Caller SHOULD fail this request. Future calls to CreateSnapshot MAY succeed if space is freed up. | - - -#### `DeleteSnapshot` - -A Controller Plugin MUST implement this RPC call if it has `CREATE_DELETE_SNAPSHOT` capability. -This RPC will be called by the CO to delete a snapshot. - -This operation MUST be idempotent. -If a snapshot corresponding to the specified `snapshot_id` does not exist or the artifacts associated with the snapshot do not exist anymore, the Plugin MUST reply `0 OK`. - -```protobuf -message DeleteSnapshotRequest { - // The ID of the snapshot to be deleted. - // This field is REQUIRED. - string snapshot_id = 1; - - // Secrets required by plugin to complete snapshot deletion request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 2 [(csi_secret) = true]; -} - -message DeleteSnapshotResponse {} -``` - -##### DeleteSnapshot Errors - -If the plugin is unable to complete the DeleteSnapshot call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Snapshot in use | 9 FAILED_PRECONDITION | Indicates that the snapshot corresponding to the specified `snapshot_id` could not be deleted because it is in use by another resource. | Caller SHOULD ensure that there are no other resources using the snapshot, and then retry with exponential back off. | -| Operation pending for snapshot | 10 ABORTED | Indicates that there is already an operation pending for the specified snapshot. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per snapshot at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same snapshot. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified snapshot, and then retry with exponential back off. | - - -#### `ListSnapshots` - -A Controller Plugin MUST implement this RPC call if it has `LIST_SNAPSHOTS` capability. -The Plugin SHALL return the information about all snapshots on the storage system within the given parameters regardless of how they were created. -`ListSnapshots` SHALL NOT list a snapshot that is being created but has not been cut successfully yet. -If snapshots are created and/or deleted while the CO is concurrently paging through `ListSnapshots` results then it is possible that the CO MAY either witness duplicate snapshots in the list, not witness existing snapshots, or both. -The CO SHALL NOT expect a consistent "view" of all snapshots when paging through the snapshot list via multiple calls to `ListSnapshots`. - -```protobuf -// List all snapshots on the storage system regardless of how they were -// created. -message ListSnapshotsRequest { - // If specified (non-zero value), the Plugin MUST NOT return more - // entries than this number in the response. If the actual number of - // entries is more than this number, the Plugin MUST set `next_token` - // in the response which can be used to get the next page of entries - // in the subsequent `ListSnapshots` call. This field is OPTIONAL. If - // not specified (zero value), it means there is no restriction on the - // number of entries that can be returned. - // The value of this field MUST NOT be negative. - int32 max_entries = 1; - - // A token to specify where to start paginating. Set this field to - // `next_token` returned by a previous `ListSnapshots` call to get the - // next page of entries. This field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string starting_token = 2; - - // Identity information for the source volume. This field is OPTIONAL. - // It can be used to list snapshots by volume. - string source_volume_id = 3; - - // Identity information for a specific snapshot. This field is - // OPTIONAL. It can be used to list only a specific snapshot. - // ListSnapshots will return with current snapshot information - // and will not block if the snapshot is being processed after - // it is cut. - string snapshot_id = 4; -} - -message ListSnapshotsResponse { - message Entry { - Snapshot snapshot = 1; - } - - repeated Entry entries = 1; - - // This token allows you to get the next page of entries for - // `ListSnapshots` request. If the number of entries is larger than - // `max_entries`, use the `next_token` as a value for the - // `starting_token` field in the next `ListSnapshots` request. This - // field is OPTIONAL. - // An empty string is equal to an unspecified field value. - string next_token = 2; -} -``` - -##### ListSnapshots Errors - -If the plugin is unable to complete the ListSnapshots call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Invalid `starting_token` | 10 ABORTED | Indicates that `starting_token` is not valid. | Caller SHOULD start the `ListSnapshots` operation again with an empty `starting_token`. | - - -#### `ControllerExpandVolume` - -A Controller plugin MUST implement this RPC call if plugin has `EXPAND_VOLUME` controller capability. -This RPC allows the CO to expand the size of a volume. - -This call MAY be made by the CO during any time in the lifecycle of the volume after creation if plugin has `VolumeExpansion.ONLINE` capability. -If plugin has `EXPAND_VOLUME` node capability, then `NodeExpandVolume` MUST be called after successful `ControllerExpandVolume` and `node_expansion_required` in `ControllerExpandVolumeResponse` is `true`. - -If the plugin has only `VolumeExpansion.OFFLINE` expansion capability and volume is currently published or available on a node then `ControllerExpandVolume` MUST be called ONLY after either: -- The plugin has controller `PUBLISH_UNPUBLISH_VOLUME` capability and `ControllerUnpublishVolume` has been invoked successfully. - -OR ELSE - -- The plugin does NOT have controller `PUBLISH_UNPUBLISH_VOLUME` capability, the plugin has node `STAGE_UNSTAGE_VOLUME` capability, and `NodeUnstageVolume` has been completed successfully. - -OR ELSE - -- The plugin does NOT have controller `PUBLISH_UNPUBLISH_VOLUME` capability, nor node `STAGE_UNSTAGE_VOLUME` capability, and `NodeUnpublishVolume` has completed successfully. - -Examples: -* Offline Volume Expansion: - Given an ElasticSearch process that runs on Azure Disk and needs more space. - - The administrator takes the Elasticsearch server offline by stopping the workload and CO calls `ControllerUnpublishVolume`. - - The administrator requests more space for the volume from CO. - - The CO in turn first makes `ControllerExpandVolume` RPC call which results in requesting more space from Azure cloud provider for volume ID that was being used by ElasticSearch. - - Once `ControllerExpandVolume` is completed and successful, the CO will inform administrator about it and administrator will resume the ElasticSearch workload. - - On the node where the ElasticSearch workload is scheduled, the CO calls `NodeExpandVolume` after calling `NodeStageVolume`. - - Calling `NodeExpandVolume` on volume results in expanding the underlying file system and added space becomes available to workload when it starts up. -* Online Volume Expansion: - Given a Mysql server running on Openstack Cinder and needs more space. - - The administrator requests more space for volume from the CO. - - The CO in turn first makes `ControllerExpandVolume` RPC call which results in requesting more space from Openstack Cinder for given volume. - - On the node where the mysql workload is running, the CO calls `NodeExpandVolume` while volume is in-use using the path where the volume is staged. - - Calling `NodeExpandVolume` on volume results in expanding the underlying file system and added space automatically becomes available to mysql workload without any downtime. - - -```protobuf -message ControllerExpandVolumeRequest { - // The ID of the volume to expand. This field is REQUIRED. - string volume_id = 1; - - // This allows CO to specify the capacity requirements of the volume - // after expansion. This field is REQUIRED. - CapacityRange capacity_range = 2; - - // Secrets required by the plugin for expanding the volume. - // This field is OPTIONAL. - map secrets = 3 [(csi_secret) = true]; -} - -message ControllerExpandVolumeResponse { - // Capacity of volume after expansion. This field is REQUIRED. - int64 capacity_bytes = 1; - - // Whether node expansion is required for the volume. When true - // the CO MUST make NodeExpandVolume RPC call on the node. This field - // is REQUIRED. - bool node_expansion_required = 2; -} -``` - -##### ControllerExpandVolume Errors - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT FOUND | Indicates that a volume corresponding to the specified volume_id does not exist. | Caller MUST verify that the volume_id is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | -| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be expanded because it is currently published on a node but the plugin does not have ONLINE expansion capability. | Caller SHOULD ensure that volume is not published and retry with exponential back off. | -| Unsupported `capacity_range` | 11 OUT_OF_RANGE | Indicates that the capacity range is not allowed by the Plugin. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the capacity range before retrying. | - -#### RPC Interactions - -##### `CreateVolume`, `DeleteVolume`, `ListVolumes` - -It is worth noting that the plugin-generated `volume_id` is a REQUIRED field for the `DeleteVolume` RPC, as opposed to the CO-generated volume `name` that is REQUIRED for the `CreateVolume` RPC: these fields MAY NOT contain the same value. -If a `CreateVolume` operation times out, leaving the CO without an ID with which to reference a volume, and the CO *also* decides that it no longer needs/wants the volume in question then the CO MAY choose one of the following paths: - -1. Replay the `CreateVolume` RPC that timed out; upon success execute `DeleteVolume` using the known volume ID (from the response to `CreateVolume`). -2. Execute the `ListVolumes` RPC to possibly obtain a volume ID that may be used to execute a `DeleteVolume` RPC; upon success execute `DeleteVolume`. -3. The CO takes no further action regarding the timed out RPC, a volume is possibly leaked and the operator/user is expected to clean up. - -It is NOT REQUIRED for a controller plugin to implement the `LIST_VOLUMES` capability if it supports the `CREATE_DELETE_VOLUME` capability: the onus is upon the CO to take into consideration the full range of plugin capabilities before deciding how to proceed in the above scenario. - -##### `CreateSnapshot`, `DeleteSnapshot`, `ListSnapshots` - -The plugin-generated `snapshot_id` is a REQUIRED field for the `DeleteSnapshot` RPC, as opposed to the CO-generated snapshot `name` that is REQUIRED for the `CreateSnapshot` RPC. -A `CreateSnapshot` operation SHOULD return with a `snapshot_id` when the snapshot is cut successfully. -If a `CreateSnapshot` operation times out before the snapshot is cut, leaving the CO without an ID with which to reference a snapshot, and the CO also decides that it no longer needs/wants the snapshot in question then the CO MAY choose one of the following paths: - -1. Execute the `ListSnapshots` RPC to possibly obtain a snapshot ID that may be used to execute a `DeleteSnapshot` RPC; upon success execute `DeleteSnapshot`. -2. The CO takes no further action regarding the timed out RPC, a snapshot is possibly leaked and the operator/user is expected to clean up. - -It is NOT REQUIRED for a controller plugin to implement the `LIST_SNAPSHOTS` capability if it supports the `CREATE_DELETE_SNAPSHOT` capability: the onus is upon the CO to take into consideration the full range of plugin capabilities before deciding how to proceed in the above scenario. - -ListSnapshots SHALL return with current information regarding the snapshots on the storage system. -When processing is complete, the `ready_to_use` parameter of the snapshot from ListSnapshots SHALL become `true`. -The downside of calling ListSnapshots is that ListSnapshots will not return a gRPC error code if an error occurs during the processing. So calling CreateSnapshot repeatedly is the preferred way to check if the processing is complete. - -### Node Service RPC - -#### `NodeStageVolume` - -A Node Plugin MUST implement this RPC call if it has `STAGE_UNSTAGE_VOLUME` node capability. - -This RPC is called by the CO prior to the volume being consumed by any workloads on the node by `NodePublishVolume`. -The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used. -This RPC SHOULD be called by the CO when a workload that wants to use the specified volume is placed (scheduled) on the specified node for the first time or for the first time since a `NodeUnstageVolume` call for the specified volume was called and returned success on that node. - -If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability and the Node Plugin has `STAGE_UNSTAGE_VOLUME` capability, then the CO MUST guarantee that this RPC is called after `ControllerPublishVolume` is called for the given volume on the given node and returns a success. -The CO MUST guarantee that this RPC is called and returns a success before any `NodePublishVolume` is called for the given volume on the given node. - -This operation MUST be idempotent. -If the volume corresponding to the `volume_id` is already staged to the `staging_target_path`, and is identical to the specified `volume_capability` the Plugin MUST reply `0 OK`. - -If this RPC failed, or the CO does not know if it failed or not, it MAY choose to call `NodeStageVolume` again, or choose to call `NodeUnstageVolume`. - -```protobuf -message NodeStageVolumeRequest { - // The ID of the volume to publish. This field is REQUIRED. - string volume_id = 1; - - // The CO SHALL set this field to the value returned by - // `ControllerPublishVolume` if the corresponding Controller Plugin - // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be - // left unset if the corresponding Controller Plugin does not have - // this capability. This is an OPTIONAL field. - map publish_context = 2; - - // The path to which the volume MAY be staged. It MUST be an - // absolute path in the root filesystem of the process serving this - // request, and MUST be a directory. The CO SHALL ensure that there - // is only one `staging_target_path` per volume. The CO SHALL ensure - // that the path is directory and that the process serving the - // request has `read` and `write` permission to that directory. The - // CO SHALL be responsible for creating the directory if it does not - // exist. - // This is a REQUIRED field. - string staging_target_path = 3; - - // Volume capability describing how the CO intends to use this volume. - // SP MUST ensure the CO can use the staged volume as described. - // Otherwise SP MUST return the appropriate gRPC error code. - // This is a REQUIRED field. - VolumeCapability volume_capability = 4; - - // Secrets required by plugin to complete node stage volume request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 5 [(csi_secret) = true]; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 6; -} - -message NodeStageVolumeResponse { - // Intentionally empty. -} -``` - -#### NodeStageVolume Errors - -If the plugin is unable to complete the NodeStageVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | -| Volume published but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified `volume_id` has already been published at the specified `staging_target_path` but is incompatible with the specified `volume_capability` flag. | Caller MUST fix the arguments before retrying. | -| Exceeds capabilities | 9 FAILED_PRECONDITION | Indicates that the CO has exceeded the volume's capabilities because the volume does not have MULTI_NODE capability. | Caller MAY choose to call `ValidateVolumeCapabilities` to validate the volume capabilities, or wait for the volume to be unpublished on the node. | - -#### `NodeUnstageVolume` - -A Node Plugin MUST implement this RPC call if it has `STAGE_UNSTAGE_VOLUME` node capability. - -This RPC is a reverse operation of `NodeStageVolume`. -This RPC MUST undo the work by the corresponding `NodeStageVolume`. -This RPC SHALL be called by the CO once for each `staging_target_path` that was successfully setup via `NodeStageVolume`. - -If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability and the Node Plugin has `STAGE_UNSTAGE_VOLUME` capability, the CO MUST guarantee that this RPC is called and returns success before calling `ControllerUnpublishVolume` for the given node and the given volume. -The CO MUST guarantee that this RPC is called after all `NodeUnpublishVolume` have been called and returned success for the given volume on the given node. - -The Plugin SHALL assume that this RPC will be executed on the node where the volume is being used. - -This RPC MAY be called by the CO when the workload using the volume is being moved to a different node, or all the workloads using the volume on a node have finished. - -This operation MUST be idempotent. -If the volume corresponding to the `volume_id` is not staged to the `staging_target_path`, the Plugin MUST reply `0 OK`. - -If this RPC failed, or the CO does not know if it failed or not, it MAY choose to call `NodeUnstageVolume` again. - -```protobuf -message NodeUnstageVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The path at which the volume was staged. It MUST be an absolute - // path in the root filesystem of the process serving this request. - // This is a REQUIRED field. - string staging_target_path = 2; -} - -message NodeUnstageVolumeResponse { - // Intentionally empty. -} -``` - -#### NodeUnstageVolume Errors - -If the plugin is unable to complete the NodeUnstageVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | - -#### RPC Interactions and Reference Counting -`NodeStageVolume`, `NodeUnstageVolume`, `NodePublishVolume`, `NodeUnpublishVolume` - -The following interaction semantics ARE REQUIRED if the plugin advertises the `STAGE_UNSTAGE_VOLUME` capability. -`NodeStageVolume` MUST be called and return success once per volume per node before any `NodePublishVolume` MAY be called for the volume. -All `NodeUnpublishVolume` MUST be called and return success for a volume before `NodeUnstageVolume` MAY be called for the volume. - -Note that this requires that all COs MUST support reference counting of volumes so that if `STAGE_UNSTAGE_VOLUME` is advertised by the SP, the CO MUST fulfill the above interaction semantics. - -#### `NodePublishVolume` - -This RPC is called by the CO when a workload that wants to use the specified volume is placed (scheduled) on a node. -The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used. - -If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability, the CO MUST guarantee that this RPC is called after `ControllerPublishVolume` is called for the given volume on the given node and returns a success. - -This operation MUST be idempotent. -If the volume corresponding to the `volume_id` has already been published at the specified `target_path`, and is compatible with the specified `volume_capability` and `readonly` flag, the Plugin MUST reply `0 OK`. - -If this RPC failed, or the CO does not know if it failed or not, it MAY choose to call `NodePublishVolume` again, or choose to call `NodeUnpublishVolume`. - -This RPC MAY be called by the CO multiple times on the same node for the same volume with possibly different `target_path` and/or other arguments if the volume has MULTI_NODE capability (i.e., `access_mode` is either `MULTI_NODE_READER_ONLY`, `MULTI_NODE_SINGLE_WRITER` or `MULTI_NODE_MULTI_WRITER`). -The following table shows what the Plugin SHOULD return when receiving a second `NodePublishVolume` on the same volume on the same node: - -| | T1=T2, P1=P2 | T1=T2, P1!=P2 | T1!=T2, P1=P2 | T1!=T2, P1!=P2 | -|----------------|-----------------|----------------|---------------------|--------------------| -| MULTI_NODE | OK (idempotent) | ALREADY_EXISTS | OK | OK | -| Non MULTI_NODE | OK (idempotent) | ALREADY_EXISTS | FAILED_PRECONDITION | FAILED_PRECONDITION| - -(`Tn`: target path of the n-th `NodePublishVolume`, `Pn`: other arguments of the n-th `NodePublishVolume` except `secrets`) - -```protobuf -message NodePublishVolumeRequest { - // The ID of the volume to publish. This field is REQUIRED. - string volume_id = 1; - - // The CO SHALL set this field to the value returned by - // `ControllerPublishVolume` if the corresponding Controller Plugin - // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be - // left unset if the corresponding Controller Plugin does not have - // this capability. This is an OPTIONAL field. - map publish_context = 2; - - // The path to which the volume was staged by `NodeStageVolume`. - // It MUST be an absolute path in the root filesystem of the process - // serving this request. - // It MUST be set if the Node Plugin implements the - // `STAGE_UNSTAGE_VOLUME` node capability. - // This is an OPTIONAL field. - string staging_target_path = 3; - - // The path to which the volume will be published. It MUST be an - // absolute path in the root filesystem of the process serving this - // request. The CO SHALL ensure uniqueness of target_path per volume. - // The CO SHALL ensure that the parent directory of this path exists - // and that the process serving the request has `read` and `write` - // permissions to that parent directory. - // For volumes with an access type of block, the SP SHALL place the - // block device at target_path. - // For volumes with an access type of mount, the SP SHALL place the - // mounted directory at target_path. - // Creation of target_path is the responsibility of the SP. - // This is a REQUIRED field. - string target_path = 4; - - // Volume capability describing how the CO intends to use this volume. - // SP MUST ensure the CO can use the published volume as described. - // Otherwise SP MUST return the appropriate gRPC error code. - // This is a REQUIRED field. - VolumeCapability volume_capability = 5; - - // Indicates SP MUST publish the volume in readonly mode. - // This field is REQUIRED. - bool readonly = 6; - - // Secrets required by plugin to complete node publish volume request. - // This field is OPTIONAL. Refer to the `Secrets Requirements` - // section on how to use this field. - map secrets = 7 [(csi_secret) = true]; - - // Volume context as returned by CO in CreateVolumeRequest. This field - // is OPTIONAL and MUST match the volume_context of the volume - // identified by `volume_id`. - map volume_context = 8; -} - -message NodePublishVolumeResponse { - // Intentionally empty. -} -``` - -##### NodePublishVolume Errors - -If the plugin is unable to complete the NodePublishVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | -| Volume published but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified `volume_id` has already been published at the specified `target_path` but is incompatible with the specified `volume_capability` or `readonly` flag. | Caller MUST fix the arguments before retrying. | -| Exceeds capabilities | 9 FAILED_PRECONDITION | Indicates that the CO has exceeded the volume's capabilities because the volume does not have MULTI_NODE capability. | Caller MAY choose to call `ValidateVolumeCapabilities` to validate the volume capabilities, or wait for the volume to be unpublished on the node. | -| Staging target path not set | 9 FAILED_PRECONDITION | Indicates that `STAGE_UNSTAGE_VOLUME` capability is set but no `staging_target_path` was set. | Caller MUST make sure call to `NodeStageVolume` is made and returns success before retrying with valid `staging_target_path`. | - - -#### `NodeUnpublishVolume` - -A Node Plugin MUST implement this RPC call. -This RPC is a reverse operation of `NodePublishVolume`. -This RPC MUST undo the work by the corresponding `NodePublishVolume`. -This RPC SHALL be called by the CO at least once for each `target_path` that was successfully setup via `NodePublishVolume`. -If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability, the CO SHOULD issue all `NodeUnpublishVolume` (as specified above) before calling `ControllerUnpublishVolume` for the given node and the given volume. -The Plugin SHALL assume that this RPC will be executed on the node where the volume is being used. - -This RPC is typically called by the CO when the workload using the volume is being moved to a different node, or all the workload using the volume on a node has finished. - -This operation MUST be idempotent. -If this RPC failed, or the CO does not know if it failed or not, it can choose to call `NodeUnpublishVolume` again. - -```protobuf -message NodeUnpublishVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The path at which the volume was published. It MUST be an absolute - // path in the root filesystem of the process serving this request. - // The SP MUST delete the file or directory it created at this path. - // This is a REQUIRED field. - string target_path = 2; -} - -message NodeUnpublishVolumeResponse { - // Intentionally empty. -} -``` - -##### NodeUnpublishVolume Errors - -If the plugin is unable to complete the NodeUnpublishVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | - - -#### `NodeGetVolumeStats` - -A Node plugin MUST implement this RPC call if it has GET_VOLUME_STATS node capability. -`NodeGetVolumeStats` RPC call returns the volume capacity statistics available for the volume. - -If the volume is being used in `BlockVolume` mode then `used` and `available` MAY be omitted from `usage` field of `NodeGetVolumeStatsResponse`. -Similarly, inode information MAY be omitted from `NodeGetVolumeStatsResponse` when unavailable. - - -```protobuf -message NodeGetVolumeStatsRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // It can be any valid path where volume was previously - // staged or published. - // It MUST be an absolute path in the root filesystem of - // the process serving this request. - // This is a REQUIRED field. - string volume_path = 2; -} - -message NodeGetVolumeStatsResponse { - // This field is OPTIONAL. - repeated VolumeUsage usage = 1; -} - -message VolumeUsage { - enum Unit { - UNKNOWN = 0; - BYTES = 1; - INODES = 2; - } - // The available capacity in specified Unit. This field is OPTIONAL. - // The value of this field MUST NOT be negative. - int64 available = 1; - - // The total capacity in specified Unit. This field is REQUIRED. - // The value of this field MUST NOT be negative. - int64 total = 2; - - // The used capacity in specified Unit. This field is OPTIONAL. - // The value of this field MUST NOT be negative. - int64 used = 3; - - // Units by which values are measured. This field is REQUIRED. - Unit unit = 4; -} -``` - -##### NodeGetVolumeStats Errors - -If the plugin is unable to complete the `NodeGetVolumeStats` call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist on specified `volume_path`. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible on specified `volume_path` and has not been deleted before retrying with exponential back off. | - -#### `NodeGetCapabilities` - -A Node Plugin MUST implement this RPC call. -This RPC allows the CO to check the supported capabilities of node service provided by the Plugin. - -```protobuf -message NodeGetCapabilitiesRequest { - // Intentionally empty. -} - -message NodeGetCapabilitiesResponse { - // All the capabilities that the node service supports. This field - // is OPTIONAL. - repeated NodeServiceCapability capabilities = 1; -} - -// Specifies a capability of the node service. -message NodeServiceCapability { - message RPC { - enum Type { - UNKNOWN = 0; - STAGE_UNSTAGE_VOLUME = 1; - // If Plugin implements GET_VOLUME_STATS capability - // then it MUST implement NodeGetVolumeStats RPC - // call for fetching volume statistics. - GET_VOLUME_STATS = 2; - // See VolumeExpansion for details. - EXPAND_VOLUME = 3; - } - - Type type = 1; - } - - oneof type { - // RPC that the controller supports. - RPC rpc = 1; - } -} -``` - -##### NodeGetCapabilities Errors - -If the plugin is unable to complete the NodeGetCapabilities call successfully, it MUST return a non-ok gRPC code in the gRPC status. - -#### `NodeGetInfo` - -A Node Plugin MUST implement this RPC call if the plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability. -The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used. -The CO SHOULD call this RPC for the node at which it wants to place the workload. -The CO MAY call this RPC more than once for a given node. -The SP SHALL NOT expect the CO to call this RPC more than once. -The result of this call will be used by CO in `ControllerPublishVolume`. - -```protobuf -message NodeGetInfoRequest { -} - -message NodeGetInfoResponse { - // The identifier of the node as understood by the SP. - // This field is REQUIRED. - // This field MUST contain enough information to uniquely identify - // this specific node vs all other nodes supported by this plugin. - // This field SHALL be used by the CO in subsequent calls, including - // `ControllerPublishVolume`, to refer to this node. - // The SP is NOT responsible for global uniqueness of node_id across - // multiple SPs. - string node_id = 1; - - // Maximum number of volumes that controller can publish to the node. - // If value is not set or zero CO SHALL decide how many volumes of - // this type can be published by the controller to the node. The - // plugin MUST NOT set negative values here. - // This field is OPTIONAL. - int64 max_volumes_per_node = 2; - - // Specifies where (regions, zones, racks, etc.) the node is - // accessible from. - // A plugin that returns this field MUST also set the - // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. - // COs MAY use this information along with the topology information - // returned in CreateVolumeResponse to ensure that a given volume is - // accessible from a given node when scheduling workloads. - // This field is OPTIONAL. If it is not specified, the CO MAY assume - // the node is not subject to any topological constraint, and MAY - // schedule workloads that reference any volume V, such that there are - // no topological constraints declared for V. - // - // Example 1: - // accessible_topology = - // {"region": "R1", "zone": "Z2"} - // Indicates the node exists within the "region" "R1" and the "zone" - // "Z2". - Topology accessible_topology = 3; -} -``` - -##### NodeGetInfo Errors - -If the plugin is unable to complete the NodeGetInfo call successfully, it MUST return a non-ok gRPC code in the gRPC status. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -#### `NodeExpandVolume` - -A Node Plugin MUST implement this RPC call if it has `EXPAND_VOLUME` node capability. -This RPC call allows CO to expand volume on a node. - -`NodeExpandVolume` ONLY supports expansion of already node-published or node-staged volumes on the given `volume_path`. - -If plugin has `STAGE_UNSTAGE_VOLUME` node capability then: -* `NodeExpandVolume` MUST be called after successful `NodeStageVolume`. -* `NodeExpandVolume` MAY be called before or after `NodePublishVolume`. - -Otherwise `NodeExpandVolume` MUST be called after successful `NodePublishVolume`. - -If a plugin only supports expansion via the `VolumeExpansion.OFFLINE` capability, then the volume MUST first be taken offline and expanded via `ControllerExpandVolume` (see `ControllerExpandVolume` for more details), and then node-staged or node-published before it can be expanded on the node via `NodeExpandVolume`. - -```protobuf -message NodeExpandVolumeRequest { - // The ID of the volume. This field is REQUIRED. - string volume_id = 1; - - // The path on which volume is available. This field is REQUIRED. - string volume_path = 2; - - // This allows CO to specify the capacity requirements of the volume - // after expansion. If capacity_range is omitted then a plugin MAY - // inspect the file system of the volume to determine the maximum - // capacity to which the volume can be expanded. In such cases a - // plugin MAY expand the volume to its maximum capacity. - // This field is OPTIONAL. - CapacityRange capacity_range = 3; -} - -message NodeExpandVolumeResponse { - // The capacity of the volume in bytes. This field is OPTIONAL. - int64 capacity_bytes = 1; -} -``` - -##### NodeExpandVolume Errors - -| Condition | gRPC code | Description | Recovery Behavior | -|-----------------------|-----------|-----------------------|-----------------------------------| -| Volume does not exist | 5 NOT FOUND | Indicates that a volume corresponding to the specified volume_id does not exist. | Caller MUST verify that the volume_id is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | -| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be expanded because it is node-published or node-staged and the underlying filesystem does not support expansion of published or staged volumes. | Caller MUST NOT retry. | -| Unsupported capacity_range | 11 OUT_OF_RANGE | Indicates that the capacity range is not allowed by the Plugin. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the capacity range before retrying. | - -## Protocol - -### Connectivity - -* A CO SHALL communicate with a Plugin using gRPC to access the `Identity`, and (optionally) the `Controller` and `Node` services. - * proto3 SHOULD be used with gRPC, as per the [official recommendations](http://www.grpc.io/docs/guides/#protocol-buffer-versions). - * All Plugins SHALL implement the REQUIRED Identity service RPCs. - Support for OPTIONAL RPCs is reported by the `ControllerGetCapabilities` and `NodeGetCapabilities` RPC calls. -* The CO SHALL provide the listen-address for the Plugin by way of the `CSI_ENDPOINT` environment variable. - Plugin components SHALL create, bind, and listen for RPCs on the specified listen address. - * Only UNIX Domain Sockets MAY be used as endpoints. - This will likely change in a future version of this specification to support non-UNIX platforms. -* All supported RPC services MUST be available at the listen address of the Plugin. - -### Security - -* The CO operator and Plugin Supervisor SHOULD take steps to ensure that any and all communication between the CO and Plugin Service are secured according to best practices. -* Communication between a CO and a Plugin SHALL be transported over UNIX Domain Sockets. - * gRPC is compatible with UNIX Domain Sockets; it is the responsibility of the CO operator and Plugin Supervisor to properly secure access to the Domain Socket using OS filesystem ACLs and/or other OS-specific security context tooling. - * SP’s supplying stand-alone Plugin controller appliances, or other remote components that are incompatible with UNIX Domain Sockets MUST provide a software component that proxies communication between a UNIX Domain Socket and the remote component(s). - Proxy components transporting communication over IP networks SHALL be responsible for securing communications over such networks. -* Both the CO and Plugin SHOULD avoid accidental leakage of sensitive information (such as redacting such information from log files). - -### Debugging - -* Debugging and tracing are supported by external, CSI-independent additions and extensions to gRPC APIs, such as [OpenTracing](https://github.com/grpc-ecosystem/grpc-opentracing). - -## Configuration and Operation - -### General Configuration - -* The `CSI_ENDPOINT` environment variable SHALL be supplied to the Plugin by the Plugin Supervisor. -* An operator SHALL configure the CO to connect to the Plugin via the listen address identified by `CSI_ENDPOINT` variable. -* With exception to sensitive data, Plugin configuration SHOULD be specified by environment variables, whenever possible, instead of by command line flags or bind-mounted/injected files. - - -#### Plugin Bootstrap Example - -* Supervisor -> Plugin: `CSI_ENDPOINT=unix:///path/to/unix/domain/socket.sock`. -* Operator -> CO: use plugin at endpoint `unix:///path/to/unix/domain/socket.sock`. -* CO: monitor `/path/to/unix/domain/socket.sock`. -* Plugin: read `CSI_ENDPOINT`, create UNIX socket at specified path, bind and listen. -* CO: observe that socket now exists, establish connection. -* CO: invoke `GetPluginCapabilities`. - -#### Filesystem - -* Plugins SHALL NOT specify requirements that include or otherwise reference directories and/or files on the root filesystem of the CO. -* Plugins SHALL NOT create additional files or directories adjacent to the UNIX socket specified by `CSI_ENDPOINT`; violations of this requirement constitute "abuse". - * The Plugin Supervisor is the ultimate authority of the directory in which the UNIX socket endpoint is created and MAY enforce policies to prevent and/or mitigate abuse of the directory by Plugins. - -### Supervised Lifecycle Management - -* For Plugins packaged in software form: - * Plugin Packages SHOULD use a well-documented container image format (e.g., Docker, OCI). - * The chosen package image format MAY expose configurable Plugin properties as environment variables, unless otherwise indicated in the section below. - Variables so exposed SHOULD be assigned default values in the image manifest. - * A Plugin Supervisor MAY programmatically evaluate or otherwise scan a Plugin Package’s image manifest in order to discover configurable environment variables. - * A Plugin SHALL NOT assume that an operator or Plugin Supervisor will scan an image manifest for environment variables. - -#### Environment Variables - -* Variables defined by this specification SHALL be identifiable by their `CSI_` name prefix. -* Configuration properties not defined by the CSI specification SHALL NOT use the same `CSI_` name prefix; this prefix is reserved for common configuration properties defined by the CSI specification. -* The Plugin Supervisor SHOULD supply all RECOMMENDED CSI environment variables to a Plugin. -* The Plugin Supervisor SHALL supply all REQUIRED CSI environment variables to a Plugin. - -##### `CSI_ENDPOINT` - -Network endpoint at which a Plugin SHALL host CSI RPC services. The general format is: - - {scheme}://{authority}{endpoint} - -The following address types SHALL be supported by Plugins: - - unix:///path/to/unix/socket.sock - -Note: All UNIX endpoints SHALL end with `.sock`. See [gRPC Name Resolution](https://github.com/grpc/grpc/blob/master/doc/naming.md). - -This variable is REQUIRED. - -#### Operational Recommendations - -The Plugin Supervisor expects that a Plugin SHALL act as a long-running service vs. an on-demand, CLI-driven process. - -Supervised plugins MAY be isolated and/or resource-bounded. - -##### Logging - -* Plugins SHOULD generate log messages to ONLY standard output and/or standard error. - * In this case the Plugin Supervisor SHALL assume responsibility for all log lifecycle management. -* Plugin implementations that deviate from the above recommendation SHALL clearly and unambiguously document the following: - * Logging configuration flags and/or variables, including working sample configurations. - * Default log destination(s) (where do the logs go if no configuration is specified?) - * Log lifecycle management ownership and related guidance (size limits, rate limits, rolling, archiving, expunging, etc.) applicable to the logging mechanism embedded within the Plugin. -* Plugins SHOULD NOT write potentially sensitive data to logs (e.g. secrets). - -##### Available Services - -* Plugin Packages MAY support all or a subset of CSI services; service combinations MAY be configurable at runtime by the Plugin Supervisor. - * A plugin MUST know the "mode" in which it is operating (e.g. node, controller, or both). - * This specification does not dictate the mechanism by which mode of operation MUST be discovered, and instead places that burden upon the SP. -* Misconfigured plugin software SHOULD fail-fast with an OS-appropriate error code. - -##### Linux Capabilities - -* Plugin Supervisor SHALL guarantee that plugins will have `CAP_SYS_ADMIN` capability on Linux when running on Nodes. -* Plugins SHOULD clearly document any additionally required capabilities and/or security context. - -##### Namespaces - -* A Plugin SHOULD NOT assume that it is in the same [Linux namespaces](https://en.wikipedia.org/wiki/Linux_namespaces) as the Plugin Supervisor. - The CO MUST clearly document the [mount propagation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) requirements for Node Plugins and the Plugin Supervisor SHALL satisfy the CO’s requirements. - -##### Cgroup Isolation - -* A Plugin MAY be constrained by cgroups. -* An operator or Plugin Supervisor MAY configure the devices cgroup subsystem to ensure that a Plugin MAY access requisite devices. -* A Plugin Supervisor MAY define resource limits for a Plugin. - -##### Resource Requirements - -* SPs SHOULD unambiguously document all of a Plugin’s resource requirements. diff --git a/vendor/github.com/containerd/cgroups/metrics.pb.txt b/vendor/github.com/containerd/cgroups/metrics.pb.txt old mode 100755 new mode 100644 diff --git a/vendor/github.com/containerd/containerd/api/1.0.pb.txt b/vendor/github.com/containerd/containerd/api/1.0.pb.txt deleted file mode 100755 index a27162c151..0000000000 --- a/vendor/github.com/containerd/containerd/api/1.0.pb.txt +++ /dev/null @@ -1,4181 +0,0 @@ -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/containerd/containerd/protobuf/plugin/fieldpath.proto" - package: "containerd.plugin" - dependency: "google/protobuf/descriptor.proto" - extension { - name: "fieldpath_all" - extendee: ".google.protobuf.FileOptions" - number: 63300 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpathAll" - } - extension { - name: "fieldpath" - extendee: ".google.protobuf.MessageOptions" - number: 64400 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpath" - } -} -file { - name: "github.com/containerd/containerd/api/events/container.proto" - package: "containerd.events" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContainerCreate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerCreate.Runtime" - json_name: "runtime" - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - } - message_type { - name: "ContainerUpdate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerUpdate.LabelsEntry" - json_name: "labels" - } - field { - name: "snapshot_key" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - 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: "ContainerDelete" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 1 - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/content.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContentDelete" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/image.proto" - package: "containerd.services.images.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ImageCreate" - 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: ".containerd.services.images.v1.ImageCreate.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: "ImageUpdate" - 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: ".containerd.services.images.v1.ImageUpdate.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: "ImageDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/namespace.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "NamespaceCreate" - 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: ".containerd.events.NamespaceCreate.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: "NamespaceUpdate" - 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: ".containerd.events.NamespaceUpdate.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: "NamespaceDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/snapshot.proto" - package: "containerd.events" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "SnapshotPrepare" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - } - message_type { - name: "SnapshotCommit" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "SnapshotRemove" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -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: "github.com/containerd/containerd/api/types/mount.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Mount" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "source" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "source" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "target" - } - field { - name: "options" - number: 4 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "options" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/task.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "TaskCreate" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "bundle" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "bundle" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "io" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.TaskIO" - options { - 65004: "IO" - } - json_name: "io" - } - field { - name: "checkpoint" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - field { - name: "pid" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskStart" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskDelete" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskIO" - field { - name: "stdin" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - } - message_type { - name: "TaskExit" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskOOM" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskExecAdded" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "TaskExecStarted" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskPaused" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskResumed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskCheckpointed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 3 - 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: "google/protobuf/field_mask.proto" - package: "google.protobuf" - message_type { - name: "FieldMask" - field { - name: "paths" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "paths" - } - } - options { - java_package: "com.google.protobuf" - java_outer_classname: "FieldMaskProto" - java_multiple_files: true - go_package: "google.golang.org/genproto/protobuf/field_mask;field_mask" - objc_class_prefix: "GPB" - csharp_namespace: "Google.Protobuf.WellKnownTypes" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/containers/v1/containers.proto" - package: "containerd.services.containers.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Container" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.LabelsEntry" - json_name: "labels" - } - field { - name: "image" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.Runtime" - json_name: "runtime" - } - field { - name: "spec" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "snapshotter" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "snapshot_key" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - field { - name: "created_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "extensions" - number: 10 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.ExtensionsEntry" - options { - 65001: 0 - } - json_name: "extensions" - } - 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 - } - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - nested_type { - name: "ExtensionsEntry" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "value" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "value" - } - options { - map_entry: true - } - } - } - message_type { - name: "GetContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "GetContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "ListContainersRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContainersResponse" - field { - name: "containers" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "containers" - } - } - message_type { - name: "CreateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "CreateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "UpdateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "DeleteContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - service { - name: "Containers" - method { - name: "Get" - input_type: ".containerd.services.containers.v1.GetContainerRequest" - output_type: ".containerd.services.containers.v1.GetContainerResponse" - } - method { - name: "List" - input_type: ".containerd.services.containers.v1.ListContainersRequest" - output_type: ".containerd.services.containers.v1.ListContainersResponse" - } - method { - name: "Create" - input_type: ".containerd.services.containers.v1.CreateContainerRequest" - output_type: ".containerd.services.containers.v1.CreateContainerResponse" - } - method { - name: "Update" - input_type: ".containerd.services.containers.v1.UpdateContainerRequest" - output_type: ".containerd.services.containers.v1.UpdateContainerResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.containers.v1.DeleteContainerRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/containers/v1;containers" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/content/v1/content.proto" - package: "containerd.services.content.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/empty.proto" - message_type { - name: "Info" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - field { - name: "size" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "created_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info.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: "InfoRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - message_type { - name: "InfoResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateRequest" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListContentRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContentResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "DeleteContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - message_type { - name: "ReadContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - field { - name: "offset" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - message_type { - name: "ReadContentResponse" - field { - name: "offset" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - } - message_type { - name: "Status" - field { - name: "started_at" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "ref" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "expected" - } - } - message_type { - name: "StatusRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - message_type { - name: "StatusResponse" - field { - name: "status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - json_name: "status" - } - } - message_type { - name: "ListStatusesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListStatusesResponse" - field { - name: "statuses" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - options { - 65001: 0 - } - json_name: "statuses" - } - } - message_type { - name: "WriteContentRequest" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "ref" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "total" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "expected" - } - field { - name: "offset" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - field { - name: "labels" - number: 7 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.WriteContentRequest.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: "WriteContentResponse" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "started_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "digest" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - message_type { - name: "AbortRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - enum_type { - name: "WriteAction" - value { - name: "STAT" - number: 0 - options { - 66001: "WriteActionStat" - } - } - value { - name: "WRITE" - number: 1 - options { - 66001: "WriteActionWrite" - } - } - value { - name: "COMMIT" - number: 2 - options { - 66001: "WriteActionCommit" - } - } - options { - 62001: 0 - 62023: "WriteAction" - } - } - service { - name: "Content" - method { - name: "Info" - input_type: ".containerd.services.content.v1.InfoRequest" - output_type: ".containerd.services.content.v1.InfoResponse" - } - method { - name: "Update" - input_type: ".containerd.services.content.v1.UpdateRequest" - output_type: ".containerd.services.content.v1.UpdateResponse" - } - method { - name: "List" - input_type: ".containerd.services.content.v1.ListContentRequest" - output_type: ".containerd.services.content.v1.ListContentResponse" - server_streaming: true - } - method { - name: "Delete" - input_type: ".containerd.services.content.v1.DeleteContentRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Read" - input_type: ".containerd.services.content.v1.ReadContentRequest" - output_type: ".containerd.services.content.v1.ReadContentResponse" - server_streaming: true - } - method { - name: "Status" - input_type: ".containerd.services.content.v1.StatusRequest" - output_type: ".containerd.services.content.v1.StatusResponse" - } - method { - name: "ListStatuses" - input_type: ".containerd.services.content.v1.ListStatusesRequest" - output_type: ".containerd.services.content.v1.ListStatusesResponse" - } - method { - name: "Write" - input_type: ".containerd.services.content.v1.WriteContentRequest" - output_type: ".containerd.services.content.v1.WriteContentResponse" - client_streaming: true - server_streaming: true - } - method { - name: "Abort" - input_type: ".containerd.services.content.v1.AbortRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/content/v1;content" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/descriptor.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Descriptor" - field { - name: "media_type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "digest" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/diff/v1/diff.proto" - package: "containerd.services.diff.v1" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "ApplyRequest" - field { - name: "diff" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - field { - name: "mounts" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ApplyResponse" - field { - name: "applied" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "applied" - } - } - message_type { - name: "DiffRequest" - field { - name: "left" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "left" - } - field { - name: "right" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "right" - } - field { - name: "media_type" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "ref" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.diff.v1.DiffRequest.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: "DiffResponse" - field { - name: "diff" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - } - service { - name: "Diff" - method { - name: "Apply" - input_type: ".containerd.services.diff.v1.ApplyRequest" - output_type: ".containerd.services.diff.v1.ApplyResponse" - } - method { - name: "Diff" - input_type: ".containerd.services.diff.v1.DiffRequest" - output_type: ".containerd.services.diff.v1.DiffResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/diff/v1;diff" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/events/v1/events.proto" - package: "containerd.services.events.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "PublishRequest" - field { - name: "topic" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - } - message_type { - name: "ForwardRequest" - field { - name: "envelope" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.events.v1.Envelope" - json_name: "envelope" - } - } - message_type { - name: "SubscribeRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "Envelope" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "timestamp" - } - field { - name: "namespace" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "namespace" - } - field { - name: "topic" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - options { - 64400: 1 - } - } - service { - name: "Events" - method { - name: "Publish" - input_type: ".containerd.services.events.v1.PublishRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Forward" - input_type: ".containerd.services.events.v1.ForwardRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Subscribe" - input_type: ".containerd.services.events.v1.SubscribeRequest" - output_type: ".containerd.services.events.v1.Envelope" - server_streaming: true - } - } - options { - go_package: "github.com/containerd/containerd/api/services/events/v1;events" - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/images/v1/images.proto" - package: "containerd.services.images.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "Image" - 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: ".containerd.services.images.v1.Image.LabelsEntry" - json_name: "labels" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - options { - 65001: 0 - } - json_name: "target" - } - field { - name: "created_at" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - 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: "GetImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - json_name: "image" - } - } - message_type { - name: "CreateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "CreateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "UpdateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "ListImagesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListImagesResponse" - field { - name: "images" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "images" - } - } - message_type { - name: "DeleteImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "sync" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "sync" - } - } - service { - name: "Images" - method { - name: "Get" - input_type: ".containerd.services.images.v1.GetImageRequest" - output_type: ".containerd.services.images.v1.GetImageResponse" - } - method { - name: "List" - input_type: ".containerd.services.images.v1.ListImagesRequest" - output_type: ".containerd.services.images.v1.ListImagesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.images.v1.CreateImageRequest" - output_type: ".containerd.services.images.v1.CreateImageResponse" - } - method { - name: "Update" - input_type: ".containerd.services.images.v1.UpdateImageRequest" - output_type: ".containerd.services.images.v1.UpdateImageResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.images.v1.DeleteImageRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/images/v1;images" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/platform.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Platform" - field { - name: "os" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65004: "OS" - } - json_name: "os" - } - field { - name: "architecture" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "architecture" - } - field { - name: "variant" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "variant" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "google/rpc/status.proto" - package: "google.rpc" - dependency: "google/protobuf/any.proto" - message_type { - name: "Status" - field { - name: "code" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT32 - json_name: "code" - } - field { - name: "message" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "message" - } - field { - name: "details" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "details" - } - } - options { - java_package: "com.google.rpc" - java_outer_classname: "StatusProto" - java_multiple_files: true - go_package: "github.com/containerd/containerd/protobuf/google/rpc;rpc" - objc_class_prefix: "RPC" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto" - package: "containerd.services.introspection.v1" - dependency: "github.com/containerd/containerd/api/types/platform.proto" - dependency: "google/rpc/status.proto" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Plugin" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "requires" - number: 3 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "requires" - } - field { - name: "platforms" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Platform" - options { - 65001: 0 - } - json_name: "platforms" - } - field { - name: "exports" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin.ExportsEntry" - json_name: "exports" - } - field { - name: "capabilities" - number: 6 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "capabilities" - } - field { - name: "init_err" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.rpc.Status" - json_name: "initErr" - } - nested_type { - name: "ExportsEntry" - 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: "PluginsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "PluginsResponse" - field { - name: "plugins" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin" - options { - 65001: 0 - } - json_name: "plugins" - } - } - service { - name: "Introspection" - method { - name: "Plugins" - input_type: ".containerd.services.introspection.v1.PluginsRequest" - output_type: ".containerd.services.introspection.v1.PluginsResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/introspection/v1;introspection" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/leases/v1/leases.proto" - package: "containerd.services.leases.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Lease" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "created_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease.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: "CreateRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.CreateRequest.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: "CreateResponse" - field { - name: "lease" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "lease" - } - } - message_type { - name: "DeleteRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "ListRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListResponse" - field { - name: "leases" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "leases" - } - } - service { - name: "Leases" - method { - name: "Create" - input_type: ".containerd.services.leases.v1.CreateRequest" - output_type: ".containerd.services.leases.v1.CreateResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.leases.v1.DeleteRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "List" - input_type: ".containerd.services.leases.v1.ListRequest" - output_type: ".containerd.services.leases.v1.ListResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/leases/v1;leases" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto" - package: "containerd.services.namespaces.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - message_type { - name: "Namespace" - 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: ".containerd.services.namespaces.v1.Namespace.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: "GetNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "ListNamespacesRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListNamespacesResponse" - field { - name: "namespaces" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespaces" - } - } - message_type { - name: "CreateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "CreateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "UpdateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "DeleteNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - service { - name: "Namespaces" - method { - name: "Get" - input_type: ".containerd.services.namespaces.v1.GetNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.GetNamespaceResponse" - } - method { - name: "List" - input_type: ".containerd.services.namespaces.v1.ListNamespacesRequest" - output_type: ".containerd.services.namespaces.v1.ListNamespacesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.namespaces.v1.CreateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.CreateNamespaceResponse" - } - method { - name: "Update" - input_type: ".containerd.services.namespaces.v1.UpdateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.UpdateNamespaceResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.namespaces.v1.DeleteNamespaceRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/namespaces/v1;namespaces" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto" - package: "containerd.services.snapshots.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - message_type { - name: "PrepareSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.PrepareSnapshotRequest.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: "PrepareSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ViewSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.ViewSnapshotRequest.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: "ViewSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "MountsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "MountsResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "RemoveSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "CommitSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "key" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.CommitSnapshotRequest.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: "StatSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "Info" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "kind" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.snapshots.v1.Kind" - json_name: "kind" - } - field { - name: "created_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 6 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info.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: "StatSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListSnapshotsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - } - message_type { - name: "ListSnapshotsResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UsageRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "UsageResponse" - field { - name: "size" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "inodes" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "inodes" - } - } - enum_type { - name: "Kind" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "KindUnknown" - } - } - value { - name: "VIEW" - number: 1 - options { - 66001: "KindView" - } - } - value { - name: "ACTIVE" - number: 2 - options { - 66001: "KindActive" - } - } - value { - name: "COMMITTED" - number: 3 - options { - 66001: "KindCommitted" - } - } - options { - 62001: 0 - 62023: "Kind" - } - } - service { - name: "Snapshots" - method { - name: "Prepare" - input_type: ".containerd.services.snapshots.v1.PrepareSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.PrepareSnapshotResponse" - } - method { - name: "View" - input_type: ".containerd.services.snapshots.v1.ViewSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.ViewSnapshotResponse" - } - method { - name: "Mounts" - input_type: ".containerd.services.snapshots.v1.MountsRequest" - output_type: ".containerd.services.snapshots.v1.MountsResponse" - } - method { - name: "Commit" - input_type: ".containerd.services.snapshots.v1.CommitSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Remove" - input_type: ".containerd.services.snapshots.v1.RemoveSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Stat" - input_type: ".containerd.services.snapshots.v1.StatSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.StatSnapshotResponse" - } - method { - name: "Update" - input_type: ".containerd.services.snapshots.v1.UpdateSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.UpdateSnapshotResponse" - } - method { - name: "List" - input_type: ".containerd.services.snapshots.v1.ListSnapshotsRequest" - output_type: ".containerd.services.snapshots.v1.ListSnapshotsResponse" - server_streaming: true - } - method { - name: "Usage" - input_type: ".containerd.services.snapshots.v1.UsageRequest" - output_type: ".containerd.services.snapshots.v1.UsageResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/snapshots/v1;snapshots" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/metrics.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Metric" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "timestamp" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "data" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "data" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/task/task.proto" - package: "containerd.v1.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/any.proto" - message_type { - name: "Process" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.v1.types.Status" - json_name: "status" - } - field { - name: "stdin" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "exit_status" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 10 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "ProcessInfo" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "info" - } - } - enum_type { - name: "Status" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "StatusUnknown" - } - } - value { - name: "CREATED" - number: 1 - options { - 66001: "StatusCreated" - } - } - value { - name: "RUNNING" - number: 2 - options { - 66001: "StatusRunning" - } - } - value { - name: "STOPPED" - number: 3 - options { - 66001: "StatusStopped" - } - } - value { - name: "PAUSED" - number: 4 - options { - 66001: "StatusPaused" - } - } - value { - name: "PAUSING" - number: 5 - options { - 66001: "StatusPausing" - } - } - options { - 62001: 0 - 62023: "Status" - } - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto" - package: "containerd.services.tasks.v1" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/metrics.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - dependency: "github.com/containerd/containerd/api/types/task/task.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "CreateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "stdin" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "checkpoint" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "checkpoint" - } - field { - name: "options" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CreateTaskResponse" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "StartRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "StartResponse" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "DeleteTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "DeleteResponse" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "DeleteProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetResponse" - field { - name: "process" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "process" - } - } - message_type { - name: "ListTasksRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListTasksResponse" - field { - name: "tasks" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "tasks" - } - } - message_type { - name: "KillRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "signal" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "signal" - } - field { - name: "all" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "all" - } - } - message_type { - name: "ExecProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "stdin" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "spec" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "exec_id" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "ExecProcessResponse" - } - message_type { - name: "ResizePtyRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "width" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "width" - } - field { - name: "height" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "height" - } - } - message_type { - name: "CloseIORequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "stdin" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "stdin" - } - } - message_type { - name: "PauseTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ResumeTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsResponse" - field { - name: "processes" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.ProcessInfo" - json_name: "processes" - } - } - message_type { - name: "CheckpointTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "parent_checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "parentCheckpoint" - } - field { - name: "options" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CheckpointTaskResponse" - field { - name: "descriptors" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "descriptors" - } - } - message_type { - name: "UpdateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "resources" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "resources" - } - } - message_type { - name: "MetricsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "MetricsResponse" - field { - name: "metrics" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Metric" - json_name: "metrics" - } - } - message_type { - name: "WaitRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "WaitResponse" - field { - name: "exit_status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - service { - name: "Tasks" - method { - name: "Create" - input_type: ".containerd.services.tasks.v1.CreateTaskRequest" - output_type: ".containerd.services.tasks.v1.CreateTaskResponse" - } - method { - name: "Start" - input_type: ".containerd.services.tasks.v1.StartRequest" - output_type: ".containerd.services.tasks.v1.StartResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.tasks.v1.DeleteTaskRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "DeleteProcess" - input_type: ".containerd.services.tasks.v1.DeleteProcessRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "Get" - input_type: ".containerd.services.tasks.v1.GetRequest" - output_type: ".containerd.services.tasks.v1.GetResponse" - } - method { - name: "List" - input_type: ".containerd.services.tasks.v1.ListTasksRequest" - output_type: ".containerd.services.tasks.v1.ListTasksResponse" - } - method { - name: "Kill" - input_type: ".containerd.services.tasks.v1.KillRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Exec" - input_type: ".containerd.services.tasks.v1.ExecProcessRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ResizePty" - input_type: ".containerd.services.tasks.v1.ResizePtyRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "CloseIO" - input_type: ".containerd.services.tasks.v1.CloseIORequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Pause" - input_type: ".containerd.services.tasks.v1.PauseTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Resume" - input_type: ".containerd.services.tasks.v1.ResumeTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ListPids" - input_type: ".containerd.services.tasks.v1.ListPidsRequest" - output_type: ".containerd.services.tasks.v1.ListPidsResponse" - } - method { - name: "Checkpoint" - input_type: ".containerd.services.tasks.v1.CheckpointTaskRequest" - output_type: ".containerd.services.tasks.v1.CheckpointTaskResponse" - } - method { - name: "Update" - input_type: ".containerd.services.tasks.v1.UpdateTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Metrics" - input_type: ".containerd.services.tasks.v1.MetricsRequest" - output_type: ".containerd.services.tasks.v1.MetricsResponse" - } - method { - name: "Wait" - input_type: ".containerd.services.tasks.v1.WaitRequest" - output_type: ".containerd.services.tasks.v1.WaitResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/tasks/v1;tasks" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/version/v1/version.proto" - package: "containerd.services.version.v1" - dependency: "google/protobuf/empty.proto" - dependency: "gogoproto/gogo.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: ".containerd.services.version.v1.VersionResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/version/v1;version" - } - weak_dependency: 1 - syntax: "proto3" -} diff --git a/vendor/github.com/containerd/containerd/api/1.1.pb.txt b/vendor/github.com/containerd/containerd/api/1.1.pb.txt deleted file mode 100755 index b4003eed18..0000000000 --- a/vendor/github.com/containerd/containerd/api/1.1.pb.txt +++ /dev/null @@ -1,4181 +0,0 @@ -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/containerd/containerd/protobuf/plugin/fieldpath.proto" - package: "containerd.plugin" - dependency: "google/protobuf/descriptor.proto" - extension { - name: "fieldpath_all" - extendee: ".google.protobuf.FileOptions" - number: 63300 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpathAll" - } - extension { - name: "fieldpath" - extendee: ".google.protobuf.MessageOptions" - number: 64400 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpath" - } -} -file { - name: "github.com/containerd/containerd/api/events/container.proto" - package: "containerd.events" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContainerCreate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerCreate.Runtime" - json_name: "runtime" - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - } - message_type { - name: "ContainerUpdate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerUpdate.LabelsEntry" - json_name: "labels" - } - field { - name: "snapshot_key" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - 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: "ContainerDelete" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 1 - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/content.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContentDelete" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/image.proto" - package: "containerd.services.images.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ImageCreate" - 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: ".containerd.services.images.v1.ImageCreate.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: "ImageUpdate" - 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: ".containerd.services.images.v1.ImageUpdate.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: "ImageDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/namespace.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "NamespaceCreate" - 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: ".containerd.events.NamespaceCreate.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: "NamespaceUpdate" - 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: ".containerd.events.NamespaceUpdate.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: "NamespaceDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/snapshot.proto" - package: "containerd.events" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "SnapshotPrepare" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - } - message_type { - name: "SnapshotCommit" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "SnapshotRemove" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -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: "github.com/containerd/containerd/api/types/mount.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Mount" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "source" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "source" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "target" - } - field { - name: "options" - number: 4 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "options" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/task.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "TaskCreate" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "bundle" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "bundle" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "io" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.TaskIO" - options { - 65004: "IO" - } - json_name: "io" - } - field { - name: "checkpoint" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - field { - name: "pid" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskStart" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskDelete" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskIO" - field { - name: "stdin" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - } - message_type { - name: "TaskExit" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskOOM" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskExecAdded" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "TaskExecStarted" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskPaused" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskResumed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskCheckpointed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 3 - 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: "google/protobuf/field_mask.proto" - package: "google.protobuf" - message_type { - name: "FieldMask" - field { - name: "paths" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "paths" - } - } - options { - java_package: "com.google.protobuf" - java_outer_classname: "FieldMaskProto" - java_multiple_files: true - go_package: "google.golang.org/genproto/protobuf/field_mask;field_mask" - objc_class_prefix: "GPB" - csharp_namespace: "Google.Protobuf.WellKnownTypes" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/containers/v1/containers.proto" - package: "containerd.services.containers.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Container" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.LabelsEntry" - json_name: "labels" - } - field { - name: "image" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.Runtime" - json_name: "runtime" - } - field { - name: "spec" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "snapshotter" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "snapshot_key" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - field { - name: "created_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "extensions" - number: 10 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.ExtensionsEntry" - options { - 65001: 0 - } - json_name: "extensions" - } - 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 - } - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - nested_type { - name: "ExtensionsEntry" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "value" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "value" - } - options { - map_entry: true - } - } - } - message_type { - name: "GetContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "GetContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "ListContainersRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContainersResponse" - field { - name: "containers" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "containers" - } - } - message_type { - name: "CreateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "CreateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "UpdateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "DeleteContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - service { - name: "Containers" - method { - name: "Get" - input_type: ".containerd.services.containers.v1.GetContainerRequest" - output_type: ".containerd.services.containers.v1.GetContainerResponse" - } - method { - name: "List" - input_type: ".containerd.services.containers.v1.ListContainersRequest" - output_type: ".containerd.services.containers.v1.ListContainersResponse" - } - method { - name: "Create" - input_type: ".containerd.services.containers.v1.CreateContainerRequest" - output_type: ".containerd.services.containers.v1.CreateContainerResponse" - } - method { - name: "Update" - input_type: ".containerd.services.containers.v1.UpdateContainerRequest" - output_type: ".containerd.services.containers.v1.UpdateContainerResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.containers.v1.DeleteContainerRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/containers/v1;containers" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/content/v1/content.proto" - package: "containerd.services.content.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/empty.proto" - message_type { - name: "Info" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - field { - name: "size" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "created_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info.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: "InfoRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - message_type { - name: "InfoResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateRequest" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListContentRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContentResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "DeleteContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - message_type { - name: "ReadContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - field { - name: "offset" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - message_type { - name: "ReadContentResponse" - field { - name: "offset" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - } - message_type { - name: "Status" - field { - name: "started_at" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "ref" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "expected" - } - } - message_type { - name: "StatusRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - message_type { - name: "StatusResponse" - field { - name: "status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - json_name: "status" - } - } - message_type { - name: "ListStatusesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListStatusesResponse" - field { - name: "statuses" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - options { - 65001: 0 - } - json_name: "statuses" - } - } - message_type { - name: "WriteContentRequest" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "ref" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "total" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "expected" - } - field { - name: "offset" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - field { - name: "labels" - number: 7 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.WriteContentRequest.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: "WriteContentResponse" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "started_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "digest" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - } - message_type { - name: "AbortRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - enum_type { - name: "WriteAction" - value { - name: "STAT" - number: 0 - options { - 66001: "WriteActionStat" - } - } - value { - name: "WRITE" - number: 1 - options { - 66001: "WriteActionWrite" - } - } - value { - name: "COMMIT" - number: 2 - options { - 66001: "WriteActionCommit" - } - } - options { - 62001: 0 - 62023: "WriteAction" - } - } - service { - name: "Content" - method { - name: "Info" - input_type: ".containerd.services.content.v1.InfoRequest" - output_type: ".containerd.services.content.v1.InfoResponse" - } - method { - name: "Update" - input_type: ".containerd.services.content.v1.UpdateRequest" - output_type: ".containerd.services.content.v1.UpdateResponse" - } - method { - name: "List" - input_type: ".containerd.services.content.v1.ListContentRequest" - output_type: ".containerd.services.content.v1.ListContentResponse" - server_streaming: true - } - method { - name: "Delete" - input_type: ".containerd.services.content.v1.DeleteContentRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Read" - input_type: ".containerd.services.content.v1.ReadContentRequest" - output_type: ".containerd.services.content.v1.ReadContentResponse" - server_streaming: true - } - method { - name: "Status" - input_type: ".containerd.services.content.v1.StatusRequest" - output_type: ".containerd.services.content.v1.StatusResponse" - } - method { - name: "ListStatuses" - input_type: ".containerd.services.content.v1.ListStatusesRequest" - output_type: ".containerd.services.content.v1.ListStatusesResponse" - } - method { - name: "Write" - input_type: ".containerd.services.content.v1.WriteContentRequest" - output_type: ".containerd.services.content.v1.WriteContentResponse" - client_streaming: true - server_streaming: true - } - method { - name: "Abort" - input_type: ".containerd.services.content.v1.AbortRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/content/v1;content" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/descriptor.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Descriptor" - field { - name: "media_type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "digest" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "digest" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/diff/v1/diff.proto" - package: "containerd.services.diff.v1" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "ApplyRequest" - field { - name: "diff" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - field { - name: "mounts" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ApplyResponse" - field { - name: "applied" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "applied" - } - } - message_type { - name: "DiffRequest" - field { - name: "left" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "left" - } - field { - name: "right" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "right" - } - field { - name: "media_type" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "ref" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.diff.v1.DiffRequest.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: "DiffResponse" - field { - name: "diff" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - } - service { - name: "Diff" - method { - name: "Apply" - input_type: ".containerd.services.diff.v1.ApplyRequest" - output_type: ".containerd.services.diff.v1.ApplyResponse" - } - method { - name: "Diff" - input_type: ".containerd.services.diff.v1.DiffRequest" - output_type: ".containerd.services.diff.v1.DiffResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/diff/v1;diff" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/events/v1/events.proto" - package: "containerd.services.events.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "PublishRequest" - field { - name: "topic" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - } - message_type { - name: "ForwardRequest" - field { - name: "envelope" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.events.v1.Envelope" - json_name: "envelope" - } - } - message_type { - name: "SubscribeRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "Envelope" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "timestamp" - } - field { - name: "namespace" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "namespace" - } - field { - name: "topic" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - options { - 64400: 1 - } - } - service { - name: "Events" - method { - name: "Publish" - input_type: ".containerd.services.events.v1.PublishRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Forward" - input_type: ".containerd.services.events.v1.ForwardRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Subscribe" - input_type: ".containerd.services.events.v1.SubscribeRequest" - output_type: ".containerd.services.events.v1.Envelope" - server_streaming: true - } - } - options { - go_package: "github.com/containerd/containerd/api/services/events/v1;events" - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/images/v1/images.proto" - package: "containerd.services.images.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "Image" - 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: ".containerd.services.images.v1.Image.LabelsEntry" - json_name: "labels" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - options { - 65001: 0 - } - json_name: "target" - } - field { - name: "created_at" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - 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: "GetImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - json_name: "image" - } - } - message_type { - name: "CreateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "CreateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "UpdateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "ListImagesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListImagesResponse" - field { - name: "images" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "images" - } - } - message_type { - name: "DeleteImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "sync" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "sync" - } - } - service { - name: "Images" - method { - name: "Get" - input_type: ".containerd.services.images.v1.GetImageRequest" - output_type: ".containerd.services.images.v1.GetImageResponse" - } - method { - name: "List" - input_type: ".containerd.services.images.v1.ListImagesRequest" - output_type: ".containerd.services.images.v1.ListImagesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.images.v1.CreateImageRequest" - output_type: ".containerd.services.images.v1.CreateImageResponse" - } - method { - name: "Update" - input_type: ".containerd.services.images.v1.UpdateImageRequest" - output_type: ".containerd.services.images.v1.UpdateImageResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.images.v1.DeleteImageRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/images/v1;images" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/platform.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Platform" - field { - name: "os" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65004: "OS" - } - json_name: "os" - } - field { - name: "architecture" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "architecture" - } - field { - name: "variant" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "variant" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "google/rpc/status.proto" - package: "google.rpc" - dependency: "google/protobuf/any.proto" - message_type { - name: "Status" - field { - name: "code" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT32 - json_name: "code" - } - field { - name: "message" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "message" - } - field { - name: "details" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "details" - } - } - options { - java_package: "com.google.rpc" - java_outer_classname: "StatusProto" - java_multiple_files: true - go_package: "rpc" - objc_class_prefix: "RPC" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto" - package: "containerd.services.introspection.v1" - dependency: "github.com/containerd/containerd/api/types/platform.proto" - dependency: "google/rpc/status.proto" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Plugin" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "requires" - number: 3 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "requires" - } - field { - name: "platforms" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Platform" - options { - 65001: 0 - } - json_name: "platforms" - } - field { - name: "exports" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin.ExportsEntry" - json_name: "exports" - } - field { - name: "capabilities" - number: 6 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "capabilities" - } - field { - name: "init_err" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.rpc.Status" - json_name: "initErr" - } - nested_type { - name: "ExportsEntry" - 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: "PluginsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "PluginsResponse" - field { - name: "plugins" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin" - options { - 65001: 0 - } - json_name: "plugins" - } - } - service { - name: "Introspection" - method { - name: "Plugins" - input_type: ".containerd.services.introspection.v1.PluginsRequest" - output_type: ".containerd.services.introspection.v1.PluginsResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/introspection/v1;introspection" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/leases/v1/leases.proto" - package: "containerd.services.leases.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Lease" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "created_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease.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: "CreateRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.CreateRequest.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: "CreateResponse" - field { - name: "lease" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "lease" - } - } - message_type { - name: "DeleteRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "ListRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListResponse" - field { - name: "leases" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "leases" - } - } - service { - name: "Leases" - method { - name: "Create" - input_type: ".containerd.services.leases.v1.CreateRequest" - output_type: ".containerd.services.leases.v1.CreateResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.leases.v1.DeleteRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "List" - input_type: ".containerd.services.leases.v1.ListRequest" - output_type: ".containerd.services.leases.v1.ListResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/leases/v1;leases" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto" - package: "containerd.services.namespaces.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - message_type { - name: "Namespace" - 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: ".containerd.services.namespaces.v1.Namespace.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: "GetNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "ListNamespacesRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListNamespacesResponse" - field { - name: "namespaces" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespaces" - } - } - message_type { - name: "CreateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "CreateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "UpdateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "DeleteNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - service { - name: "Namespaces" - method { - name: "Get" - input_type: ".containerd.services.namespaces.v1.GetNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.GetNamespaceResponse" - } - method { - name: "List" - input_type: ".containerd.services.namespaces.v1.ListNamespacesRequest" - output_type: ".containerd.services.namespaces.v1.ListNamespacesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.namespaces.v1.CreateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.CreateNamespaceResponse" - } - method { - name: "Update" - input_type: ".containerd.services.namespaces.v1.UpdateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.UpdateNamespaceResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.namespaces.v1.DeleteNamespaceRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/namespaces/v1;namespaces" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto" - package: "containerd.services.snapshots.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - message_type { - name: "PrepareSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.PrepareSnapshotRequest.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: "PrepareSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ViewSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.ViewSnapshotRequest.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: "ViewSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "MountsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "MountsResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "RemoveSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "CommitSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "key" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.CommitSnapshotRequest.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: "StatSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "Info" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "kind" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.snapshots.v1.Kind" - json_name: "kind" - } - field { - name: "created_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 6 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info.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: "StatSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListSnapshotsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - } - message_type { - name: "ListSnapshotsResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UsageRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "UsageResponse" - field { - name: "size" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "inodes" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "inodes" - } - } - enum_type { - name: "Kind" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "KindUnknown" - } - } - value { - name: "VIEW" - number: 1 - options { - 66001: "KindView" - } - } - value { - name: "ACTIVE" - number: 2 - options { - 66001: "KindActive" - } - } - value { - name: "COMMITTED" - number: 3 - options { - 66001: "KindCommitted" - } - } - options { - 62001: 0 - 62023: "Kind" - } - } - service { - name: "Snapshots" - method { - name: "Prepare" - input_type: ".containerd.services.snapshots.v1.PrepareSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.PrepareSnapshotResponse" - } - method { - name: "View" - input_type: ".containerd.services.snapshots.v1.ViewSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.ViewSnapshotResponse" - } - method { - name: "Mounts" - input_type: ".containerd.services.snapshots.v1.MountsRequest" - output_type: ".containerd.services.snapshots.v1.MountsResponse" - } - method { - name: "Commit" - input_type: ".containerd.services.snapshots.v1.CommitSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Remove" - input_type: ".containerd.services.snapshots.v1.RemoveSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Stat" - input_type: ".containerd.services.snapshots.v1.StatSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.StatSnapshotResponse" - } - method { - name: "Update" - input_type: ".containerd.services.snapshots.v1.UpdateSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.UpdateSnapshotResponse" - } - method { - name: "List" - input_type: ".containerd.services.snapshots.v1.ListSnapshotsRequest" - output_type: ".containerd.services.snapshots.v1.ListSnapshotsResponse" - server_streaming: true - } - method { - name: "Usage" - input_type: ".containerd.services.snapshots.v1.UsageRequest" - output_type: ".containerd.services.snapshots.v1.UsageResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/snapshots/v1;snapshots" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/metrics.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Metric" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "timestamp" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "data" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "data" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/task/task.proto" - package: "containerd.v1.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/any.proto" - message_type { - name: "Process" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.v1.types.Status" - json_name: "status" - } - field { - name: "stdin" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "exit_status" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 10 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "ProcessInfo" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "info" - } - } - enum_type { - name: "Status" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "StatusUnknown" - } - } - value { - name: "CREATED" - number: 1 - options { - 66001: "StatusCreated" - } - } - value { - name: "RUNNING" - number: 2 - options { - 66001: "StatusRunning" - } - } - value { - name: "STOPPED" - number: 3 - options { - 66001: "StatusStopped" - } - } - value { - name: "PAUSED" - number: 4 - options { - 66001: "StatusPaused" - } - } - value { - name: "PAUSING" - number: 5 - options { - 66001: "StatusPausing" - } - } - options { - 62001: 0 - 62023: "Status" - } - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto" - package: "containerd.services.tasks.v1" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/metrics.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - dependency: "github.com/containerd/containerd/api/types/task/task.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "CreateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "stdin" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "checkpoint" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "checkpoint" - } - field { - name: "options" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CreateTaskResponse" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "StartRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "StartResponse" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "DeleteTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "DeleteResponse" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - message_type { - name: "DeleteProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetResponse" - field { - name: "process" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "process" - } - } - message_type { - name: "ListTasksRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListTasksResponse" - field { - name: "tasks" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "tasks" - } - } - message_type { - name: "KillRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "signal" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "signal" - } - field { - name: "all" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "all" - } - } - message_type { - name: "ExecProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "stdin" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "spec" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "exec_id" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "ExecProcessResponse" - } - message_type { - name: "ResizePtyRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "width" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "width" - } - field { - name: "height" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "height" - } - } - message_type { - name: "CloseIORequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "stdin" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "stdin" - } - } - message_type { - name: "PauseTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ResumeTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsResponse" - field { - name: "processes" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.ProcessInfo" - json_name: "processes" - } - } - message_type { - name: "CheckpointTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "parent_checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65003: "github.com/opencontainers/go-digest.Digest" - 65001: 0 - } - json_name: "parentCheckpoint" - } - field { - name: "options" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CheckpointTaskResponse" - field { - name: "descriptors" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "descriptors" - } - } - message_type { - name: "UpdateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "resources" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "resources" - } - } - message_type { - name: "MetricsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "MetricsResponse" - field { - name: "metrics" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Metric" - json_name: "metrics" - } - } - message_type { - name: "WaitRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "WaitResponse" - field { - name: "exit_status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65010: 1 - 65001: 0 - } - json_name: "exitedAt" - } - } - service { - name: "Tasks" - method { - name: "Create" - input_type: ".containerd.services.tasks.v1.CreateTaskRequest" - output_type: ".containerd.services.tasks.v1.CreateTaskResponse" - } - method { - name: "Start" - input_type: ".containerd.services.tasks.v1.StartRequest" - output_type: ".containerd.services.tasks.v1.StartResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.tasks.v1.DeleteTaskRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "DeleteProcess" - input_type: ".containerd.services.tasks.v1.DeleteProcessRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "Get" - input_type: ".containerd.services.tasks.v1.GetRequest" - output_type: ".containerd.services.tasks.v1.GetResponse" - } - method { - name: "List" - input_type: ".containerd.services.tasks.v1.ListTasksRequest" - output_type: ".containerd.services.tasks.v1.ListTasksResponse" - } - method { - name: "Kill" - input_type: ".containerd.services.tasks.v1.KillRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Exec" - input_type: ".containerd.services.tasks.v1.ExecProcessRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ResizePty" - input_type: ".containerd.services.tasks.v1.ResizePtyRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "CloseIO" - input_type: ".containerd.services.tasks.v1.CloseIORequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Pause" - input_type: ".containerd.services.tasks.v1.PauseTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Resume" - input_type: ".containerd.services.tasks.v1.ResumeTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ListPids" - input_type: ".containerd.services.tasks.v1.ListPidsRequest" - output_type: ".containerd.services.tasks.v1.ListPidsResponse" - } - method { - name: "Checkpoint" - input_type: ".containerd.services.tasks.v1.CheckpointTaskRequest" - output_type: ".containerd.services.tasks.v1.CheckpointTaskResponse" - } - method { - name: "Update" - input_type: ".containerd.services.tasks.v1.UpdateTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Metrics" - input_type: ".containerd.services.tasks.v1.MetricsRequest" - output_type: ".containerd.services.tasks.v1.MetricsResponse" - } - method { - name: "Wait" - input_type: ".containerd.services.tasks.v1.WaitRequest" - output_type: ".containerd.services.tasks.v1.WaitResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/tasks/v1;tasks" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/version/v1/version.proto" - package: "containerd.services.version.v1" - dependency: "google/protobuf/empty.proto" - dependency: "gogoproto/gogo.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: ".containerd.services.version.v1.VersionResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/version/v1;version" - } - weak_dependency: 1 - syntax: "proto3" -} diff --git a/vendor/github.com/containerd/containerd/api/1.2.pb.txt b/vendor/github.com/containerd/containerd/api/1.2.pb.txt deleted file mode 100755 index 288556afaf..0000000000 --- a/vendor/github.com/containerd/containerd/api/1.2.pb.txt +++ /dev/null @@ -1,4205 +0,0 @@ -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/containerd/containerd/protobuf/plugin/fieldpath.proto" - package: "containerd.plugin" - dependency: "google/protobuf/descriptor.proto" - extension { - name: "fieldpath_all" - extendee: ".google.protobuf.FileOptions" - number: 63300 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpathAll" - } - extension { - name: "fieldpath" - extendee: ".google.protobuf.MessageOptions" - number: 64400 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpath" - } -} -file { - name: "github.com/containerd/containerd/api/events/container.proto" - package: "containerd.events" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContainerCreate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerCreate.Runtime" - json_name: "runtime" - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - } - message_type { - name: "ContainerUpdate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerUpdate.LabelsEntry" - json_name: "labels" - } - field { - name: "snapshot_key" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - 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: "ContainerDelete" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 1 - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/content.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContentDelete" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/image.proto" - package: "containerd.services.images.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ImageCreate" - 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: ".containerd.services.images.v1.ImageCreate.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: "ImageUpdate" - 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: ".containerd.services.images.v1.ImageUpdate.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: "ImageDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/namespace.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "NamespaceCreate" - 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: ".containerd.events.NamespaceCreate.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: "NamespaceUpdate" - 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: ".containerd.events.NamespaceUpdate.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: "NamespaceDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/snapshot.proto" - package: "containerd.events" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "SnapshotPrepare" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - } - message_type { - name: "SnapshotCommit" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "SnapshotRemove" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -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: "github.com/containerd/containerd/api/types/mount.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Mount" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "source" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "source" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "target" - } - field { - name: "options" - number: 4 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "options" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/task.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "TaskCreate" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "bundle" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "bundle" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "io" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.TaskIO" - options { - 65004: "IO" - } - json_name: "io" - } - field { - name: "checkpoint" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - field { - name: "pid" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskStart" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskDelete" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskIO" - field { - name: "stdin" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - } - message_type { - name: "TaskExit" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskOOM" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskExecAdded" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "TaskExecStarted" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskPaused" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskResumed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskCheckpointed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 3 - 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: "google/protobuf/field_mask.proto" - package: "google.protobuf" - message_type { - name: "FieldMask" - field { - name: "paths" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "paths" - } - } - options { - java_package: "com.google.protobuf" - java_outer_classname: "FieldMaskProto" - java_multiple_files: true - go_package: "google.golang.org/genproto/protobuf/field_mask;field_mask" - objc_class_prefix: "GPB" - csharp_namespace: "Google.Protobuf.WellKnownTypes" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/containers/v1/containers.proto" - package: "containerd.services.containers.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Container" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.LabelsEntry" - json_name: "labels" - } - field { - name: "image" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.Runtime" - json_name: "runtime" - } - field { - name: "spec" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "snapshotter" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "snapshot_key" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - field { - name: "created_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "extensions" - number: 10 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.ExtensionsEntry" - options { - 65001: 0 - } - json_name: "extensions" - } - 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 - } - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - nested_type { - name: "ExtensionsEntry" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "value" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "value" - } - options { - map_entry: true - } - } - } - message_type { - name: "GetContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "GetContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "ListContainersRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContainersResponse" - field { - name: "containers" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "containers" - } - } - message_type { - name: "CreateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "CreateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "UpdateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "DeleteContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "ListContainerMessage" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - json_name: "container" - } - } - service { - name: "Containers" - method { - name: "Get" - input_type: ".containerd.services.containers.v1.GetContainerRequest" - output_type: ".containerd.services.containers.v1.GetContainerResponse" - } - method { - name: "List" - input_type: ".containerd.services.containers.v1.ListContainersRequest" - output_type: ".containerd.services.containers.v1.ListContainersResponse" - } - method { - name: "ListStream" - input_type: ".containerd.services.containers.v1.ListContainersRequest" - output_type: ".containerd.services.containers.v1.ListContainerMessage" - server_streaming: true - } - method { - name: "Create" - input_type: ".containerd.services.containers.v1.CreateContainerRequest" - output_type: ".containerd.services.containers.v1.CreateContainerResponse" - } - method { - name: "Update" - input_type: ".containerd.services.containers.v1.UpdateContainerRequest" - output_type: ".containerd.services.containers.v1.UpdateContainerResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.containers.v1.DeleteContainerRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/containers/v1;containers" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/content/v1/content.proto" - package: "containerd.services.content.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/empty.proto" - message_type { - name: "Info" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - field { - name: "size" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "created_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info.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: "InfoRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - message_type { - name: "InfoResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateRequest" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListContentRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContentResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "DeleteContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - message_type { - name: "ReadContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - field { - name: "offset" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - message_type { - name: "ReadContentResponse" - field { - name: "offset" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - } - message_type { - name: "Status" - field { - name: "started_at" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "ref" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "expected" - } - } - message_type { - name: "StatusRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - message_type { - name: "StatusResponse" - field { - name: "status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - json_name: "status" - } - } - message_type { - name: "ListStatusesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListStatusesResponse" - field { - name: "statuses" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - options { - 65001: 0 - } - json_name: "statuses" - } - } - message_type { - name: "WriteContentRequest" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "ref" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "total" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "expected" - } - field { - name: "offset" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - field { - name: "labels" - number: 7 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.WriteContentRequest.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: "WriteContentResponse" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "started_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "digest" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - message_type { - name: "AbortRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - enum_type { - name: "WriteAction" - value { - name: "STAT" - number: 0 - options { - 66001: "WriteActionStat" - } - } - value { - name: "WRITE" - number: 1 - options { - 66001: "WriteActionWrite" - } - } - value { - name: "COMMIT" - number: 2 - options { - 66001: "WriteActionCommit" - } - } - options { - 62001: 0 - 62023: "WriteAction" - } - } - service { - name: "Content" - method { - name: "Info" - input_type: ".containerd.services.content.v1.InfoRequest" - output_type: ".containerd.services.content.v1.InfoResponse" - } - method { - name: "Update" - input_type: ".containerd.services.content.v1.UpdateRequest" - output_type: ".containerd.services.content.v1.UpdateResponse" - } - method { - name: "List" - input_type: ".containerd.services.content.v1.ListContentRequest" - output_type: ".containerd.services.content.v1.ListContentResponse" - server_streaming: true - } - method { - name: "Delete" - input_type: ".containerd.services.content.v1.DeleteContentRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Read" - input_type: ".containerd.services.content.v1.ReadContentRequest" - output_type: ".containerd.services.content.v1.ReadContentResponse" - server_streaming: true - } - method { - name: "Status" - input_type: ".containerd.services.content.v1.StatusRequest" - output_type: ".containerd.services.content.v1.StatusResponse" - } - method { - name: "ListStatuses" - input_type: ".containerd.services.content.v1.ListStatusesRequest" - output_type: ".containerd.services.content.v1.ListStatusesResponse" - } - method { - name: "Write" - input_type: ".containerd.services.content.v1.WriteContentRequest" - output_type: ".containerd.services.content.v1.WriteContentResponse" - client_streaming: true - server_streaming: true - } - method { - name: "Abort" - input_type: ".containerd.services.content.v1.AbortRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/content/v1;content" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/descriptor.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Descriptor" - field { - name: "media_type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "digest" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/diff/v1/diff.proto" - package: "containerd.services.diff.v1" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "ApplyRequest" - field { - name: "diff" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - field { - name: "mounts" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ApplyResponse" - field { - name: "applied" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "applied" - } - } - message_type { - name: "DiffRequest" - field { - name: "left" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "left" - } - field { - name: "right" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "right" - } - field { - name: "media_type" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "ref" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.diff.v1.DiffRequest.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: "DiffResponse" - field { - name: "diff" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - } - service { - name: "Diff" - method { - name: "Apply" - input_type: ".containerd.services.diff.v1.ApplyRequest" - output_type: ".containerd.services.diff.v1.ApplyResponse" - } - method { - name: "Diff" - input_type: ".containerd.services.diff.v1.DiffRequest" - output_type: ".containerd.services.diff.v1.DiffResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/diff/v1;diff" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/events/v1/events.proto" - package: "containerd.services.events.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "PublishRequest" - field { - name: "topic" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - } - message_type { - name: "ForwardRequest" - field { - name: "envelope" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.events.v1.Envelope" - json_name: "envelope" - } - } - message_type { - name: "SubscribeRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "Envelope" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "timestamp" - } - field { - name: "namespace" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "namespace" - } - field { - name: "topic" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - options { - 64400: 1 - } - } - service { - name: "Events" - method { - name: "Publish" - input_type: ".containerd.services.events.v1.PublishRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Forward" - input_type: ".containerd.services.events.v1.ForwardRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Subscribe" - input_type: ".containerd.services.events.v1.SubscribeRequest" - output_type: ".containerd.services.events.v1.Envelope" - server_streaming: true - } - } - options { - go_package: "github.com/containerd/containerd/api/services/events/v1;events" - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/images/v1/images.proto" - package: "containerd.services.images.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "Image" - 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: ".containerd.services.images.v1.Image.LabelsEntry" - json_name: "labels" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - options { - 65001: 0 - } - json_name: "target" - } - field { - name: "created_at" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - 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: "GetImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - json_name: "image" - } - } - message_type { - name: "CreateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "CreateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "UpdateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "ListImagesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListImagesResponse" - field { - name: "images" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "images" - } - } - message_type { - name: "DeleteImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "sync" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "sync" - } - } - service { - name: "Images" - method { - name: "Get" - input_type: ".containerd.services.images.v1.GetImageRequest" - output_type: ".containerd.services.images.v1.GetImageResponse" - } - method { - name: "List" - input_type: ".containerd.services.images.v1.ListImagesRequest" - output_type: ".containerd.services.images.v1.ListImagesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.images.v1.CreateImageRequest" - output_type: ".containerd.services.images.v1.CreateImageResponse" - } - method { - name: "Update" - input_type: ".containerd.services.images.v1.UpdateImageRequest" - output_type: ".containerd.services.images.v1.UpdateImageResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.images.v1.DeleteImageRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/images/v1;images" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/platform.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Platform" - field { - name: "os" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65004: "OS" - } - json_name: "os" - } - field { - name: "architecture" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "architecture" - } - field { - name: "variant" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "variant" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "google/rpc/status.proto" - package: "google.rpc" - dependency: "google/protobuf/any.proto" - message_type { - name: "Status" - field { - name: "code" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT32 - json_name: "code" - } - field { - name: "message" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "message" - } - field { - name: "details" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "details" - } - } - options { - java_package: "com.google.rpc" - java_outer_classname: "StatusProto" - java_multiple_files: true - go_package: "rpc" - objc_class_prefix: "RPC" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto" - package: "containerd.services.introspection.v1" - dependency: "github.com/containerd/containerd/api/types/platform.proto" - dependency: "google/rpc/status.proto" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Plugin" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "requires" - number: 3 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "requires" - } - field { - name: "platforms" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Platform" - options { - 65001: 0 - } - json_name: "platforms" - } - field { - name: "exports" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin.ExportsEntry" - json_name: "exports" - } - field { - name: "capabilities" - number: 6 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "capabilities" - } - field { - name: "init_err" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.rpc.Status" - json_name: "initErr" - } - nested_type { - name: "ExportsEntry" - 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: "PluginsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "PluginsResponse" - field { - name: "plugins" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin" - options { - 65001: 0 - } - json_name: "plugins" - } - } - service { - name: "Introspection" - method { - name: "Plugins" - input_type: ".containerd.services.introspection.v1.PluginsRequest" - output_type: ".containerd.services.introspection.v1.PluginsResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/introspection/v1;introspection" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/leases/v1/leases.proto" - package: "containerd.services.leases.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Lease" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "created_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease.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: "CreateRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.CreateRequest.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: "CreateResponse" - field { - name: "lease" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "lease" - } - } - message_type { - name: "DeleteRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "sync" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "sync" - } - } - message_type { - name: "ListRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListResponse" - field { - name: "leases" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "leases" - } - } - service { - name: "Leases" - method { - name: "Create" - input_type: ".containerd.services.leases.v1.CreateRequest" - output_type: ".containerd.services.leases.v1.CreateResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.leases.v1.DeleteRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "List" - input_type: ".containerd.services.leases.v1.ListRequest" - output_type: ".containerd.services.leases.v1.ListResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/leases/v1;leases" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto" - package: "containerd.services.namespaces.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - message_type { - name: "Namespace" - 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: ".containerd.services.namespaces.v1.Namespace.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: "GetNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "ListNamespacesRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListNamespacesResponse" - field { - name: "namespaces" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespaces" - } - } - message_type { - name: "CreateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "CreateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "UpdateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "DeleteNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - service { - name: "Namespaces" - method { - name: "Get" - input_type: ".containerd.services.namespaces.v1.GetNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.GetNamespaceResponse" - } - method { - name: "List" - input_type: ".containerd.services.namespaces.v1.ListNamespacesRequest" - output_type: ".containerd.services.namespaces.v1.ListNamespacesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.namespaces.v1.CreateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.CreateNamespaceResponse" - } - method { - name: "Update" - input_type: ".containerd.services.namespaces.v1.UpdateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.UpdateNamespaceResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.namespaces.v1.DeleteNamespaceRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/namespaces/v1;namespaces" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto" - package: "containerd.services.snapshots.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - message_type { - name: "PrepareSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.PrepareSnapshotRequest.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: "PrepareSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ViewSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.ViewSnapshotRequest.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: "ViewSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "MountsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "MountsResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "RemoveSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "CommitSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "key" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.CommitSnapshotRequest.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: "StatSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "Info" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "kind" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.snapshots.v1.Kind" - json_name: "kind" - } - field { - name: "created_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 6 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info.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: "StatSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListSnapshotsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - } - message_type { - name: "ListSnapshotsResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UsageRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "UsageResponse" - field { - name: "size" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "inodes" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "inodes" - } - } - enum_type { - name: "Kind" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "KindUnknown" - } - } - value { - name: "VIEW" - number: 1 - options { - 66001: "KindView" - } - } - value { - name: "ACTIVE" - number: 2 - options { - 66001: "KindActive" - } - } - value { - name: "COMMITTED" - number: 3 - options { - 66001: "KindCommitted" - } - } - options { - 62001: 0 - 62023: "Kind" - } - } - service { - name: "Snapshots" - method { - name: "Prepare" - input_type: ".containerd.services.snapshots.v1.PrepareSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.PrepareSnapshotResponse" - } - method { - name: "View" - input_type: ".containerd.services.snapshots.v1.ViewSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.ViewSnapshotResponse" - } - method { - name: "Mounts" - input_type: ".containerd.services.snapshots.v1.MountsRequest" - output_type: ".containerd.services.snapshots.v1.MountsResponse" - } - method { - name: "Commit" - input_type: ".containerd.services.snapshots.v1.CommitSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Remove" - input_type: ".containerd.services.snapshots.v1.RemoveSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Stat" - input_type: ".containerd.services.snapshots.v1.StatSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.StatSnapshotResponse" - } - method { - name: "Update" - input_type: ".containerd.services.snapshots.v1.UpdateSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.UpdateSnapshotResponse" - } - method { - name: "List" - input_type: ".containerd.services.snapshots.v1.ListSnapshotsRequest" - output_type: ".containerd.services.snapshots.v1.ListSnapshotsResponse" - server_streaming: true - } - method { - name: "Usage" - input_type: ".containerd.services.snapshots.v1.UsageRequest" - output_type: ".containerd.services.snapshots.v1.UsageResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/snapshots/v1;snapshots" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/metrics.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Metric" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "timestamp" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "data" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "data" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/task/task.proto" - package: "containerd.v1.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/any.proto" - message_type { - name: "Process" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.v1.types.Status" - json_name: "status" - } - field { - name: "stdin" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "exit_status" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 10 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "ProcessInfo" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "info" - } - } - enum_type { - name: "Status" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "StatusUnknown" - } - } - value { - name: "CREATED" - number: 1 - options { - 66001: "StatusCreated" - } - } - value { - name: "RUNNING" - number: 2 - options { - 66001: "StatusRunning" - } - } - value { - name: "STOPPED" - number: 3 - options { - 66001: "StatusStopped" - } - } - value { - name: "PAUSED" - number: 4 - options { - 66001: "StatusPaused" - } - } - value { - name: "PAUSING" - number: 5 - options { - 66001: "StatusPausing" - } - } - options { - 62001: 0 - 62023: "Status" - } - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto" - package: "containerd.services.tasks.v1" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/metrics.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - dependency: "github.com/containerd/containerd/api/types/task/task.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "CreateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "stdin" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "checkpoint" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "checkpoint" - } - field { - name: "options" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CreateTaskResponse" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "StartRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "StartResponse" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "DeleteTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "DeleteResponse" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "DeleteProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetResponse" - field { - name: "process" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "process" - } - } - message_type { - name: "ListTasksRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListTasksResponse" - field { - name: "tasks" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "tasks" - } - } - message_type { - name: "KillRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "signal" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "signal" - } - field { - name: "all" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "all" - } - } - message_type { - name: "ExecProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "stdin" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "spec" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "exec_id" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "ExecProcessResponse" - } - message_type { - name: "ResizePtyRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "width" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "width" - } - field { - name: "height" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "height" - } - } - message_type { - name: "CloseIORequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "stdin" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "stdin" - } - } - message_type { - name: "PauseTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ResumeTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsResponse" - field { - name: "processes" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.ProcessInfo" - json_name: "processes" - } - } - message_type { - name: "CheckpointTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "parent_checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "parentCheckpoint" - } - field { - name: "options" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CheckpointTaskResponse" - field { - name: "descriptors" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "descriptors" - } - } - message_type { - name: "UpdateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "resources" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "resources" - } - } - message_type { - name: "MetricsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "MetricsResponse" - field { - name: "metrics" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Metric" - json_name: "metrics" - } - } - message_type { - name: "WaitRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "WaitResponse" - field { - name: "exit_status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - service { - name: "Tasks" - method { - name: "Create" - input_type: ".containerd.services.tasks.v1.CreateTaskRequest" - output_type: ".containerd.services.tasks.v1.CreateTaskResponse" - } - method { - name: "Start" - input_type: ".containerd.services.tasks.v1.StartRequest" - output_type: ".containerd.services.tasks.v1.StartResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.tasks.v1.DeleteTaskRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "DeleteProcess" - input_type: ".containerd.services.tasks.v1.DeleteProcessRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "Get" - input_type: ".containerd.services.tasks.v1.GetRequest" - output_type: ".containerd.services.tasks.v1.GetResponse" - } - method { - name: "List" - input_type: ".containerd.services.tasks.v1.ListTasksRequest" - output_type: ".containerd.services.tasks.v1.ListTasksResponse" - } - method { - name: "Kill" - input_type: ".containerd.services.tasks.v1.KillRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Exec" - input_type: ".containerd.services.tasks.v1.ExecProcessRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ResizePty" - input_type: ".containerd.services.tasks.v1.ResizePtyRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "CloseIO" - input_type: ".containerd.services.tasks.v1.CloseIORequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Pause" - input_type: ".containerd.services.tasks.v1.PauseTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Resume" - input_type: ".containerd.services.tasks.v1.ResumeTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ListPids" - input_type: ".containerd.services.tasks.v1.ListPidsRequest" - output_type: ".containerd.services.tasks.v1.ListPidsResponse" - } - method { - name: "Checkpoint" - input_type: ".containerd.services.tasks.v1.CheckpointTaskRequest" - output_type: ".containerd.services.tasks.v1.CheckpointTaskResponse" - } - method { - name: "Update" - input_type: ".containerd.services.tasks.v1.UpdateTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Metrics" - input_type: ".containerd.services.tasks.v1.MetricsRequest" - output_type: ".containerd.services.tasks.v1.MetricsResponse" - } - method { - name: "Wait" - input_type: ".containerd.services.tasks.v1.WaitRequest" - output_type: ".containerd.services.tasks.v1.WaitResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/tasks/v1;tasks" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/version/v1/version.proto" - package: "containerd.services.version.v1" - dependency: "google/protobuf/empty.proto" - dependency: "gogoproto/gogo.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: ".containerd.services.version.v1.VersionResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/version/v1;version" - } - weak_dependency: 1 - syntax: "proto3" -} diff --git a/vendor/github.com/containerd/containerd/api/README.md b/vendor/github.com/containerd/containerd/api/README.md deleted file mode 100644 index f6eb28c6a5..0000000000 --- a/vendor/github.com/containerd/containerd/api/README.md +++ /dev/null @@ -1,18 +0,0 @@ -This directory contains the GRPC API definitions for containerd. - -All defined services and messages have been aggregated into `*.pb.txt` -descriptors files in this directory. Definitions present here are considered -frozen after the release. - -At release time, the current `next.pb.txt` file will be moved into place to -freeze the API changes for the minor version. For example, when 1.0.0 is -released, `next.pb.txt` should be moved to `1.0.txt`. Notice that we leave off -the patch number, since the API will be completely locked down for a given -patch series. - -We may find that by default, protobuf descriptors are too noisy to lock down -API changes. In that case, we may filter out certain fields in the descriptors, -possibly regenerating for old versions. - -This process is similar to the [process used to ensure backwards compatibility -in Go](https://github.com/golang/go/tree/master/api). diff --git a/vendor/github.com/containerd/containerd/api/next.pb.txt b/vendor/github.com/containerd/containerd/api/next.pb.txt deleted file mode 100755 index b5eed3949b..0000000000 --- a/vendor/github.com/containerd/containerd/api/next.pb.txt +++ /dev/null @@ -1,4233 +0,0 @@ -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/containerd/containerd/protobuf/plugin/fieldpath.proto" - package: "containerd.plugin" - dependency: "google/protobuf/descriptor.proto" - extension { - name: "fieldpath_all" - extendee: ".google.protobuf.FileOptions" - number: 63300 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpathAll" - } - extension { - name: "fieldpath" - extendee: ".google.protobuf.MessageOptions" - number: 64400 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "fieldpath" - } -} -file { - name: "github.com/containerd/containerd/api/events/container.proto" - package: "containerd.events" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContainerCreate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerCreate.Runtime" - json_name: "runtime" - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - } - message_type { - name: "ContainerUpdate" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "image" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.events.ContainerUpdate.LabelsEntry" - json_name: "labels" - } - field { - name: "snapshot_key" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - 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: "ContainerDelete" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 1 - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/content.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ContentDelete" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/image.proto" - package: "containerd.services.images.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "ImageCreate" - 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: ".containerd.services.images.v1.ImageCreate.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: "ImageUpdate" - 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: ".containerd.services.images.v1.ImageUpdate.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: "ImageDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/namespace.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "NamespaceCreate" - 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: ".containerd.events.NamespaceCreate.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: "NamespaceUpdate" - 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: ".containerd.events.NamespaceUpdate.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: "NamespaceDelete" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/snapshot.proto" - package: "containerd.events" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "SnapshotPrepare" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - } - message_type { - name: "SnapshotCommit" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "SnapshotRemove" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - syntax: "proto3" -} -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: "github.com/containerd/containerd/api/types/mount.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Mount" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "source" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "source" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "target" - } - field { - name: "options" - number: 4 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "options" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/events/task.proto" - package: "containerd.events" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - message_type { - name: "TaskCreate" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "bundle" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "bundle" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "io" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.events.TaskIO" - options { - 65004: "IO" - } - json_name: "io" - } - field { - name: "checkpoint" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - field { - name: "pid" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskStart" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskDelete" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskIO" - field { - name: "stdin" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - } - message_type { - name: "TaskExit" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "TaskOOM" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskExecAdded" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "TaskExecStarted" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "TaskPaused" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskResumed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "TaskCheckpointed" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "checkpoint" - } - } - options { - go_package: "github.com/containerd/containerd/api/events;events" - 63300: 1 - } - weak_dependency: 0 - weak_dependency: 3 - 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: "google/protobuf/field_mask.proto" - package: "google.protobuf" - message_type { - name: "FieldMask" - field { - name: "paths" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "paths" - } - } - options { - java_package: "com.google.protobuf" - java_outer_classname: "FieldMaskProto" - java_multiple_files: true - go_package: "google.golang.org/genproto/protobuf/field_mask;field_mask" - objc_class_prefix: "GPB" - csharp_namespace: "Google.Protobuf.WellKnownTypes" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/containers/v1/containers.proto" - package: "containerd.services.containers.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Container" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.LabelsEntry" - json_name: "labels" - } - field { - name: "image" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "image" - } - field { - name: "runtime" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.Runtime" - json_name: "runtime" - } - field { - name: "spec" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "snapshotter" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "snapshot_key" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotKey" - } - field { - name: "created_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "extensions" - number: 10 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container.ExtensionsEntry" - options { - 65001: 0 - } - json_name: "extensions" - } - 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 - } - } - nested_type { - name: "Runtime" - 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.Any" - json_name: "options" - } - } - nested_type { - name: "ExtensionsEntry" - field { - name: "key" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "value" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "value" - } - options { - map_entry: true - } - } - } - message_type { - name: "GetContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "GetContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "ListContainersRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContainersResponse" - field { - name: "containers" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "containers" - } - } - message_type { - name: "CreateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "CreateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "UpdateContainerRequest" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateContainerResponse" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - options { - 65001: 0 - } - json_name: "container" - } - } - message_type { - name: "DeleteContainerRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - } - message_type { - name: "ListContainerMessage" - field { - name: "container" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.containers.v1.Container" - json_name: "container" - } - } - service { - name: "Containers" - method { - name: "Get" - input_type: ".containerd.services.containers.v1.GetContainerRequest" - output_type: ".containerd.services.containers.v1.GetContainerResponse" - } - method { - name: "List" - input_type: ".containerd.services.containers.v1.ListContainersRequest" - output_type: ".containerd.services.containers.v1.ListContainersResponse" - } - method { - name: "ListStream" - input_type: ".containerd.services.containers.v1.ListContainersRequest" - output_type: ".containerd.services.containers.v1.ListContainerMessage" - server_streaming: true - } - method { - name: "Create" - input_type: ".containerd.services.containers.v1.CreateContainerRequest" - output_type: ".containerd.services.containers.v1.CreateContainerResponse" - } - method { - name: "Update" - input_type: ".containerd.services.containers.v1.UpdateContainerRequest" - output_type: ".containerd.services.containers.v1.UpdateContainerResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.containers.v1.DeleteContainerRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/containers/v1;containers" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/content/v1/content.proto" - package: "containerd.services.content.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/empty.proto" - message_type { - name: "Info" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - field { - name: "size" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "created_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info.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: "InfoRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - message_type { - name: "InfoResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateRequest" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListContentRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListContentResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "DeleteContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - message_type { - name: "ReadContentRequest" - field { - name: "digest" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - field { - name: "offset" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - } - message_type { - name: "ReadContentResponse" - field { - name: "offset" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - } - message_type { - name: "Status" - field { - name: "started_at" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "ref" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "expected" - } - } - message_type { - name: "StatusRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - message_type { - name: "StatusResponse" - field { - name: "status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - json_name: "status" - } - } - message_type { - name: "ListStatusesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListStatusesResponse" - field { - name: "statuses" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.Status" - options { - 65001: 0 - } - json_name: "statuses" - } - } - message_type { - name: "WriteContentRequest" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "ref" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "total" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "expected" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "expected" - } - field { - name: "offset" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "data" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_BYTES - json_name: "data" - } - field { - name: "labels" - number: 7 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.content.v1.WriteContentRequest.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: "WriteContentResponse" - field { - name: "action" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.content.v1.WriteAction" - json_name: "action" - } - field { - name: "started_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "startedAt" - } - field { - name: "updated_at" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "offset" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "offset" - } - field { - name: "total" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "total" - } - field { - name: "digest" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - } - message_type { - name: "AbortRequest" - field { - name: "ref" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - } - enum_type { - name: "WriteAction" - value { - name: "STAT" - number: 0 - options { - 66001: "WriteActionStat" - } - } - value { - name: "WRITE" - number: 1 - options { - 66001: "WriteActionWrite" - } - } - value { - name: "COMMIT" - number: 2 - options { - 66001: "WriteActionCommit" - } - } - options { - 62001: 0 - 62023: "WriteAction" - } - } - service { - name: "Content" - method { - name: "Info" - input_type: ".containerd.services.content.v1.InfoRequest" - output_type: ".containerd.services.content.v1.InfoResponse" - } - method { - name: "Update" - input_type: ".containerd.services.content.v1.UpdateRequest" - output_type: ".containerd.services.content.v1.UpdateResponse" - } - method { - name: "List" - input_type: ".containerd.services.content.v1.ListContentRequest" - output_type: ".containerd.services.content.v1.ListContentResponse" - server_streaming: true - } - method { - name: "Delete" - input_type: ".containerd.services.content.v1.DeleteContentRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Read" - input_type: ".containerd.services.content.v1.ReadContentRequest" - output_type: ".containerd.services.content.v1.ReadContentResponse" - server_streaming: true - } - method { - name: "Status" - input_type: ".containerd.services.content.v1.StatusRequest" - output_type: ".containerd.services.content.v1.StatusResponse" - } - method { - name: "ListStatuses" - input_type: ".containerd.services.content.v1.ListStatusesRequest" - output_type: ".containerd.services.content.v1.ListStatusesResponse" - } - method { - name: "Write" - input_type: ".containerd.services.content.v1.WriteContentRequest" - output_type: ".containerd.services.content.v1.WriteContentResponse" - client_streaming: true - server_streaming: true - } - method { - name: "Abort" - input_type: ".containerd.services.content.v1.AbortRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/content/v1;content" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/descriptor.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Descriptor" - field { - name: "media_type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "digest" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "digest" - } - field { - name: "size" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "annotations" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor.AnnotationsEntry" - json_name: "annotations" - } - nested_type { - name: "AnnotationsEntry" - 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 - } - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/diff/v1/diff.proto" - package: "containerd.services.diff.v1" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "ApplyRequest" - field { - name: "diff" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - field { - name: "mounts" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ApplyResponse" - field { - name: "applied" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "applied" - } - } - message_type { - name: "DiffRequest" - field { - name: "left" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "left" - } - field { - name: "right" - number: 2 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "right" - } - field { - name: "media_type" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "mediaType" - } - field { - name: "ref" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "ref" - } - field { - name: "labels" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.diff.v1.DiffRequest.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: "DiffResponse" - field { - name: "diff" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "diff" - } - } - service { - name: "Diff" - method { - name: "Apply" - input_type: ".containerd.services.diff.v1.ApplyRequest" - output_type: ".containerd.services.diff.v1.ApplyResponse" - } - method { - name: "Diff" - input_type: ".containerd.services.diff.v1.DiffRequest" - output_type: ".containerd.services.diff.v1.DiffResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/diff/v1;diff" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/events/v1/events.proto" - package: "containerd.services.events.v1" - dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "PublishRequest" - field { - name: "topic" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - } - message_type { - name: "ForwardRequest" - field { - name: "envelope" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.events.v1.Envelope" - json_name: "envelope" - } - } - message_type { - name: "SubscribeRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "Envelope" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "timestamp" - } - field { - name: "namespace" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "namespace" - } - field { - name: "topic" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "topic" - } - field { - name: "event" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "event" - } - options { - 64400: 1 - } - } - service { - name: "Events" - method { - name: "Publish" - input_type: ".containerd.services.events.v1.PublishRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Forward" - input_type: ".containerd.services.events.v1.ForwardRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Subscribe" - input_type: ".containerd.services.events.v1.SubscribeRequest" - output_type: ".containerd.services.events.v1.Envelope" - server_streaming: true - } - } - options { - go_package: "github.com/containerd/containerd/api/services/events/v1;events" - } - weak_dependency: 0 - weak_dependency: 1 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/images/v1/images.proto" - package: "containerd.services.images.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - message_type { - name: "Image" - 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: ".containerd.services.images.v1.Image.LabelsEntry" - json_name: "labels" - } - field { - name: "target" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - options { - 65001: 0 - } - json_name: "target" - } - field { - name: "created_at" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - 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: "GetImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - json_name: "image" - } - } - message_type { - name: "CreateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "CreateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "UpdateImageRequest" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateImageResponse" - field { - name: "image" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "image" - } - } - message_type { - name: "ListImagesRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListImagesResponse" - field { - name: "images" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.images.v1.Image" - options { - 65001: 0 - } - json_name: "images" - } - } - message_type { - name: "DeleteImageRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "sync" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "sync" - } - } - service { - name: "Images" - method { - name: "Get" - input_type: ".containerd.services.images.v1.GetImageRequest" - output_type: ".containerd.services.images.v1.GetImageResponse" - } - method { - name: "List" - input_type: ".containerd.services.images.v1.ListImagesRequest" - output_type: ".containerd.services.images.v1.ListImagesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.images.v1.CreateImageRequest" - output_type: ".containerd.services.images.v1.CreateImageResponse" - } - method { - name: "Update" - input_type: ".containerd.services.images.v1.UpdateImageRequest" - output_type: ".containerd.services.images.v1.UpdateImageResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.images.v1.DeleteImageRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/images/v1;images" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/platform.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Platform" - field { - name: "os" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65004: "OS" - } - json_name: "os" - } - field { - name: "architecture" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "architecture" - } - field { - name: "variant" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "variant" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "google/rpc/status.proto" - package: "google.rpc" - dependency: "google/protobuf/any.proto" - message_type { - name: "Status" - field { - name: "code" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT32 - json_name: "code" - } - field { - name: "message" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "message" - } - field { - name: "details" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "details" - } - } - options { - java_package: "com.google.rpc" - java_outer_classname: "StatusProto" - java_multiple_files: true - go_package: "rpc" - objc_class_prefix: "RPC" - } - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto" - package: "containerd.services.introspection.v1" - dependency: "github.com/containerd/containerd/api/types/platform.proto" - dependency: "google/rpc/status.proto" - dependency: "gogoproto/gogo.proto" - message_type { - name: "Plugin" - field { - name: "type" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "type" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "requires" - number: 3 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "requires" - } - field { - name: "platforms" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Platform" - options { - 65001: 0 - } - json_name: "platforms" - } - field { - name: "exports" - number: 5 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin.ExportsEntry" - json_name: "exports" - } - field { - name: "capabilities" - number: 6 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "capabilities" - } - field { - name: "init_err" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.rpc.Status" - json_name: "initErr" - } - nested_type { - name: "ExportsEntry" - 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: "PluginsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "PluginsResponse" - field { - name: "plugins" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.introspection.v1.Plugin" - options { - 65001: 0 - } - json_name: "plugins" - } - } - service { - name: "Introspection" - method { - name: "Plugins" - input_type: ".containerd.services.introspection.v1.PluginsRequest" - output_type: ".containerd.services.introspection.v1.PluginsResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/introspection/v1;introspection" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/leases/v1/leases.proto" - package: "containerd.services.leases.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Lease" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "created_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease.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: "CreateRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "labels" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.CreateRequest.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: "CreateResponse" - field { - name: "lease" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "lease" - } - } - message_type { - name: "DeleteRequest" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "sync" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "sync" - } - } - message_type { - name: "ListRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "ListResponse" - field { - name: "leases" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.leases.v1.Lease" - json_name: "leases" - } - } - service { - name: "Leases" - method { - name: "Create" - input_type: ".containerd.services.leases.v1.CreateRequest" - output_type: ".containerd.services.leases.v1.CreateResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.leases.v1.DeleteRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "List" - input_type: ".containerd.services.leases.v1.ListRequest" - output_type: ".containerd.services.leases.v1.ListResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/leases/v1;leases" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto" - package: "containerd.services.namespaces.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - message_type { - name: "Namespace" - 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: ".containerd.services.namespaces.v1.Namespace.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: "GetNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - message_type { - name: "GetNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "ListNamespacesRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListNamespacesResponse" - field { - name: "namespaces" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespaces" - } - } - message_type { - name: "CreateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "CreateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "UpdateNamespaceRequest" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - field { - name: "update_mask" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateNamespaceResponse" - field { - name: "namespace" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.namespaces.v1.Namespace" - options { - 65001: 0 - } - json_name: "namespace" - } - } - message_type { - name: "DeleteNamespaceRequest" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - } - service { - name: "Namespaces" - method { - name: "Get" - input_type: ".containerd.services.namespaces.v1.GetNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.GetNamespaceResponse" - } - method { - name: "List" - input_type: ".containerd.services.namespaces.v1.ListNamespacesRequest" - output_type: ".containerd.services.namespaces.v1.ListNamespacesResponse" - } - method { - name: "Create" - input_type: ".containerd.services.namespaces.v1.CreateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.CreateNamespaceResponse" - } - method { - name: "Update" - input_type: ".containerd.services.namespaces.v1.UpdateNamespaceRequest" - output_type: ".containerd.services.namespaces.v1.UpdateNamespaceResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.namespaces.v1.DeleteNamespaceRequest" - output_type: ".google.protobuf.Empty" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/namespaces/v1;namespaces" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto" - package: "containerd.services.snapshots.v1" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/field_mask.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - message_type { - name: "PrepareSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.PrepareSnapshotRequest.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: "PrepareSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "ViewSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "parent" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.ViewSnapshotRequest.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: "ViewSnapshotResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "MountsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "MountsResponse" - field { - name: "mounts" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "mounts" - } - } - message_type { - name: "RemoveSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "CommitSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "name" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "key" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - field { - name: "labels" - number: 4 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.CommitSnapshotRequest.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: "StatSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "Info" - field { - name: "name" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "name" - } - field { - name: "parent" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "parent" - } - field { - name: "kind" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.services.snapshots.v1.Kind" - json_name: "kind" - } - field { - name: "created_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "createdAt" - } - field { - name: "updated_at" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "updatedAt" - } - field { - name: "labels" - number: 6 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info.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: "StatSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UpdateSnapshotRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - field { - name: "update_mask" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.FieldMask" - json_name: "updateMask" - } - } - message_type { - name: "UpdateSnapshotResponse" - field { - name: "info" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "ListSnapshotsRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - } - message_type { - name: "ListSnapshotsResponse" - field { - name: "info" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.services.snapshots.v1.Info" - options { - 65001: 0 - } - json_name: "info" - } - } - message_type { - name: "UsageRequest" - field { - name: "snapshotter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "snapshotter" - } - field { - name: "key" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "key" - } - } - message_type { - name: "UsageResponse" - field { - name: "size" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "size" - } - field { - name: "inodes" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_INT64 - json_name: "inodes" - } - } - enum_type { - name: "Kind" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "KindUnknown" - } - } - value { - name: "VIEW" - number: 1 - options { - 66001: "KindView" - } - } - value { - name: "ACTIVE" - number: 2 - options { - 66001: "KindActive" - } - } - value { - name: "COMMITTED" - number: 3 - options { - 66001: "KindCommitted" - } - } - options { - 62001: 0 - 62023: "Kind" - } - } - service { - name: "Snapshots" - method { - name: "Prepare" - input_type: ".containerd.services.snapshots.v1.PrepareSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.PrepareSnapshotResponse" - } - method { - name: "View" - input_type: ".containerd.services.snapshots.v1.ViewSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.ViewSnapshotResponse" - } - method { - name: "Mounts" - input_type: ".containerd.services.snapshots.v1.MountsRequest" - output_type: ".containerd.services.snapshots.v1.MountsResponse" - } - method { - name: "Commit" - input_type: ".containerd.services.snapshots.v1.CommitSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Remove" - input_type: ".containerd.services.snapshots.v1.RemoveSnapshotRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Stat" - input_type: ".containerd.services.snapshots.v1.StatSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.StatSnapshotResponse" - } - method { - name: "Update" - input_type: ".containerd.services.snapshots.v1.UpdateSnapshotRequest" - output_type: ".containerd.services.snapshots.v1.UpdateSnapshotResponse" - } - method { - name: "List" - input_type: ".containerd.services.snapshots.v1.ListSnapshotsRequest" - output_type: ".containerd.services.snapshots.v1.ListSnapshotsResponse" - server_streaming: true - } - method { - name: "Usage" - input_type: ".containerd.services.snapshots.v1.UsageRequest" - output_type: ".containerd.services.snapshots.v1.UsageResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/snapshots/v1;snapshots" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/metrics.proto" - package: "containerd.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/any.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "Metric" - field { - name: "timestamp" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "timestamp" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "data" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "data" - } - } - options { - go_package: "github.com/containerd/containerd/api/types;types" - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/types/task/task.proto" - package: "containerd.v1.types" - dependency: "gogoproto/gogo.proto" - dependency: "google/protobuf/timestamp.proto" - dependency: "google/protobuf/any.proto" - message_type { - name: "Process" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "status" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_ENUM - type_name: ".containerd.v1.types.Status" - json_name: "status" - } - field { - name: "stdin" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "exit_status" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 10 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "ProcessInfo" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "info" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "info" - } - } - enum_type { - name: "Status" - value { - name: "UNKNOWN" - number: 0 - options { - 66001: "StatusUnknown" - } - } - value { - name: "CREATED" - number: 1 - options { - 66001: "StatusCreated" - } - } - value { - name: "RUNNING" - number: 2 - options { - 66001: "StatusRunning" - } - } - value { - name: "STOPPED" - number: 3 - options { - 66001: "StatusStopped" - } - } - value { - name: "PAUSED" - number: 4 - options { - 66001: "StatusPaused" - } - } - value { - name: "PAUSING" - number: 5 - options { - 66001: "StatusPausing" - } - } - options { - 62001: 0 - 62023: "Status" - } - } - weak_dependency: 0 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto" - package: "containerd.services.tasks.v1" - dependency: "google/protobuf/empty.proto" - dependency: "google/protobuf/any.proto" - dependency: "gogoproto/gogo.proto" - dependency: "github.com/containerd/containerd/api/types/mount.proto" - dependency: "github.com/containerd/containerd/api/types/metrics.proto" - dependency: "github.com/containerd/containerd/api/types/descriptor.proto" - dependency: "github.com/containerd/containerd/api/types/task/task.proto" - dependency: "google/protobuf/timestamp.proto" - message_type { - name: "CreateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "rootfs" - number: 3 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Mount" - json_name: "rootfs" - } - field { - name: "stdin" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "checkpoint" - number: 8 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "checkpoint" - } - field { - name: "options" - number: 9 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CreateTaskResponse" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "StartRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "StartResponse" - field { - name: "pid" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - } - message_type { - name: "DeleteTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "DeleteResponse" - field { - name: "id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "id" - } - field { - name: "pid" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "pid" - } - field { - name: "exit_status" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - message_type { - name: "DeleteProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "GetResponse" - field { - name: "process" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "process" - } - } - message_type { - name: "ListTasksRequest" - field { - name: "filter" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "filter" - } - } - message_type { - name: "ListTasksResponse" - field { - name: "tasks" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.Process" - json_name: "tasks" - } - } - message_type { - name: "KillRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "signal" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "signal" - } - field { - name: "all" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "all" - } - } - message_type { - name: "ExecProcessRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "stdin" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdin" - } - field { - name: "stdout" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stdout" - } - field { - name: "stderr" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "stderr" - } - field { - name: "terminal" - number: 5 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "terminal" - } - field { - name: "spec" - number: 6 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "spec" - } - field { - name: "exec_id" - number: 7 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "ExecProcessResponse" - } - message_type { - name: "ResizePtyRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "width" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "width" - } - field { - name: "height" - number: 4 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "height" - } - } - message_type { - name: "CloseIORequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - field { - name: "stdin" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_BOOL - json_name: "stdin" - } - } - message_type { - name: "PauseTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ResumeTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - } - message_type { - name: "ListPidsResponse" - field { - name: "processes" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.v1.types.ProcessInfo" - json_name: "processes" - } - } - message_type { - name: "CheckpointTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "parent_checkpoint" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - options { - 65001: 0 - 65003: "github.com/opencontainers/go-digest.Digest" - } - json_name: "parentCheckpoint" - } - field { - name: "options" - number: 3 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "options" - } - } - message_type { - name: "CheckpointTaskResponse" - field { - name: "descriptors" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Descriptor" - json_name: "descriptors" - } - } - message_type { - name: "UpdateTaskRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "resources" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Any" - json_name: "resources" - } - } - message_type { - name: "MetricsRequest" - field { - name: "filters" - number: 1 - label: LABEL_REPEATED - type: TYPE_STRING - json_name: "filters" - } - } - message_type { - name: "MetricsResponse" - field { - name: "metrics" - number: 1 - label: LABEL_REPEATED - type: TYPE_MESSAGE - type_name: ".containerd.types.Metric" - json_name: "metrics" - } - } - message_type { - name: "WaitRequest" - field { - name: "container_id" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "containerId" - } - field { - name: "exec_id" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_STRING - json_name: "execId" - } - } - message_type { - name: "WaitResponse" - field { - name: "exit_status" - number: 1 - label: LABEL_OPTIONAL - type: TYPE_UINT32 - json_name: "exitStatus" - } - field { - name: "exited_at" - number: 2 - label: LABEL_OPTIONAL - type: TYPE_MESSAGE - type_name: ".google.protobuf.Timestamp" - options { - 65001: 0 - 65010: 1 - } - json_name: "exitedAt" - } - } - service { - name: "Tasks" - method { - name: "Create" - input_type: ".containerd.services.tasks.v1.CreateTaskRequest" - output_type: ".containerd.services.tasks.v1.CreateTaskResponse" - } - method { - name: "Start" - input_type: ".containerd.services.tasks.v1.StartRequest" - output_type: ".containerd.services.tasks.v1.StartResponse" - } - method { - name: "Delete" - input_type: ".containerd.services.tasks.v1.DeleteTaskRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "DeleteProcess" - input_type: ".containerd.services.tasks.v1.DeleteProcessRequest" - output_type: ".containerd.services.tasks.v1.DeleteResponse" - } - method { - name: "Get" - input_type: ".containerd.services.tasks.v1.GetRequest" - output_type: ".containerd.services.tasks.v1.GetResponse" - } - method { - name: "List" - input_type: ".containerd.services.tasks.v1.ListTasksRequest" - output_type: ".containerd.services.tasks.v1.ListTasksResponse" - } - method { - name: "Kill" - input_type: ".containerd.services.tasks.v1.KillRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Exec" - input_type: ".containerd.services.tasks.v1.ExecProcessRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ResizePty" - input_type: ".containerd.services.tasks.v1.ResizePtyRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "CloseIO" - input_type: ".containerd.services.tasks.v1.CloseIORequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Pause" - input_type: ".containerd.services.tasks.v1.PauseTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Resume" - input_type: ".containerd.services.tasks.v1.ResumeTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "ListPids" - input_type: ".containerd.services.tasks.v1.ListPidsRequest" - output_type: ".containerd.services.tasks.v1.ListPidsResponse" - } - method { - name: "Checkpoint" - input_type: ".containerd.services.tasks.v1.CheckpointTaskRequest" - output_type: ".containerd.services.tasks.v1.CheckpointTaskResponse" - } - method { - name: "Update" - input_type: ".containerd.services.tasks.v1.UpdateTaskRequest" - output_type: ".google.protobuf.Empty" - } - method { - name: "Metrics" - input_type: ".containerd.services.tasks.v1.MetricsRequest" - output_type: ".containerd.services.tasks.v1.MetricsResponse" - } - method { - name: "Wait" - input_type: ".containerd.services.tasks.v1.WaitRequest" - output_type: ".containerd.services.tasks.v1.WaitResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/tasks/v1;tasks" - } - weak_dependency: 2 - syntax: "proto3" -} -file { - name: "github.com/containerd/containerd/api/services/version/v1/version.proto" - package: "containerd.services.version.v1" - dependency: "google/protobuf/empty.proto" - dependency: "gogoproto/gogo.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: ".containerd.services.version.v1.VersionResponse" - } - } - options { - go_package: "github.com/containerd/containerd/api/services/version/v1;version" - } - weak_dependency: 1 - syntax: "proto3" -} diff --git a/vendor/github.com/containerd/containerd/contrib/Dockerfile.test b/vendor/github.com/containerd/containerd/contrib/Dockerfile.test deleted file mode 100644 index 900fa1babf..0000000000 --- a/vendor/github.com/containerd/containerd/contrib/Dockerfile.test +++ /dev/null @@ -1,53 +0,0 @@ -# This dockerfile is used to test containerd within a container -# -# usage: -# 1.) docker build -t containerd-test -f Dockerfile.test ../ -# 2.) docker run -it --privileged -v /tmp:/tmp --tmpfs /var/lib/containerd-test containerd-test bash -# 3.) $ make binaries install test -# - -ARG GOLANG_VERSION=1.12 - -FROM golang:${GOLANG_VERSION} AS golang-base -RUN mkdir -p /go/src/github.com/containerd/containerd -WORKDIR /go/src/github.com/containerd/containerd - -# Install proto3 -FROM golang-base AS proto3 -RUN apt-get update && apt-get install -y \ - autoconf \ - automake \ - g++ \ - libtool \ - unzip \ - --no-install-recommends - -COPY script/setup/install-protobuf install-protobuf -RUN ./install-protobuf - -# Install runc -FROM golang-base AS runc -RUN apt-get update && apt-get install -y \ - curl \ - libseccomp-dev \ - --no-install-recommends - -COPY vendor.conf vendor.conf -COPY script/setup/install-runc install-runc -RUN ./install-runc - -FROM golang-base AS dev -RUN apt-get update && apt-get install -y \ - btrfs-tools \ - gcc \ - git \ - libseccomp-dev \ - make \ - xfsprogs \ - --no-install-recommends - -COPY --from=proto3 /usr/local/bin/protoc /usr/local/bin/protoc -COPY --from=proto3 /usr/local/include/google /usr/local/include/google -COPY --from=runc /usr/local/sbin/runc /usr/local/go/bin/runc - -COPY . . diff --git a/vendor/github.com/containerd/containerd/contrib/README.md b/vendor/github.com/containerd/containerd/contrib/README.md deleted file mode 100644 index f19f03a609..0000000000 --- a/vendor/github.com/containerd/containerd/contrib/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# contrib - -The `contrib` directory contains packages that do not belong in the core containerd packages but still contribute to overall containerd usability. - -Package such as Apparmor or Selinux are placed in `contrib` because they are platform dependent and often require higher level tools and profiles to work. - -Packaging and other built tools can be added to `contrib` to aid in packaging containerd for various distributions. - -## Testing - -Code in the `contrib` directory may or may not have been tested in the normal test pipeline for core components. diff --git a/vendor/github.com/containerd/containerd/runtime/linux/runctypes/1.0.pb.txt b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/1.0.pb.txt old mode 100755 new mode 100644 diff --git a/vendor/github.com/containerd/containerd/runtime/linux/runctypes/next.pb.txt b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/next.pb.txt old mode 100755 new mode 100644 diff --git a/vendor/github.com/containerd/containerd/runtime/v2/runc/options/next.pb.txt b/vendor/github.com/containerd/containerd/runtime/v2/runc/options/next.pb.txt old mode 100755 new mode 100644 diff --git a/vendor/github.com/containerd/continuity/sysx/generate.sh b/vendor/github.com/containerd/continuity/sysx/generate.sh old mode 100755 new mode 100644 diff --git a/vendor/github.com/containerd/typeurl/.travis.yml b/vendor/github.com/containerd/typeurl/.travis.yml index d7bc38258a..a9791e1d63 100644 --- a/vendor/github.com/containerd/typeurl/.travis.yml +++ b/vendor/github.com/containerd/typeurl/.travis.yml @@ -4,7 +4,17 @@ go: - 1.10.x - tip +install: + - go get -t -v ./... + - go get -u github.com/vbatts/git-validation + - go get -u github.com/kunalkushwaha/ltag + +before_script: + - pushd ..; git clone https://github.com/containerd/project; popd + script: + - DCO_VERBOSITY=-q ../project/script/validate/dco + - ../project/script/validate/fileheader ../project/ - go test -race -coverprofile=coverage.txt -covermode=atomic after_success: diff --git a/vendor/github.com/containerd/typeurl/LICENSE b/vendor/github.com/containerd/typeurl/LICENSE index 261eeb9e9f..584149b6ee 100644 --- a/vendor/github.com/containerd/typeurl/LICENSE +++ b/vendor/github.com/containerd/typeurl/LICENSE @@ -1,6 +1,7 @@ + Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -175,24 +176,13 @@ END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] + Copyright The containerd Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/vendor/github.com/containerd/typeurl/README.md b/vendor/github.com/containerd/typeurl/README.md index e0787743c5..67f1b8447f 100644 --- a/vendor/github.com/containerd/typeurl/README.md +++ b/vendor/github.com/containerd/typeurl/README.md @@ -7,3 +7,13 @@ A Go package for managing the registration, marshaling, and unmarshaling of encoded types. This package helps when types are sent over a GRPC API and marshaled as a [protobuf.Any](). + +## Project details + +**typeurl** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. diff --git a/vendor/github.com/containerd/typeurl/doc.go b/vendor/github.com/containerd/typeurl/doc.go new file mode 100644 index 0000000000..c0d0fd2053 --- /dev/null +++ b/vendor/github.com/containerd/typeurl/doc.go @@ -0,0 +1,83 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package typeurl + +// Package typeurl assists with managing the registration, marshaling, and +// unmarshaling of types encoded as protobuf.Any. +// +// A protobuf.Any is a proto message that can contain any arbitrary data. It +// consists of two components, a TypeUrl and a Value, and its proto definition +// looks like this: +// +// message Any { +// string type_url = 1; +// bytes value = 2; +// } +// +// The TypeUrl is used to distinguish the contents from other proto.Any +// messages. This typeurl library manages these URLs to enable automagic +// marshaling and unmarshaling of the contents. +// +// For example, consider this go struct: +// +// type Foo struct { +// Field1 string +// Field2 string +// } +// +// To use typeurl, types must first be registered. This is typically done in +// the init function +// +// func init() { +// typeurl.Register(&Foo{}, "Foo") +// } +// +// This will register the type Foo with the url path "Foo". The arguments to +// Register are variadic, and are used to construct a url path. Consider this +// example, from the github.com/containerd/containerd/client package: +// +// func init() { +// const prefix = "types.containerd.io" +// // register TypeUrls for commonly marshaled external types +// major := strconv.Itoa(specs.VersionMajor) +// typeurl.Register(&specs.Spec{}, prefix, "opencontainers/runtime-spec", major, "Spec") +// // this function has more Register calls, which are elided. +// } +// +// This registers several types under a more complex url, which ends up mapping +// to `types.containerd.io/opencontainers/runtime-spec/1/Spec` (or some other +// value for major). +// +// Once a type is registered, it can be marshaled to a proto.Any message simply +// by calling `MarshalAny`, like this: +// +// foo := &Foo{Field1: "value1", Field2: "value2"} +// anyFoo, err := typeurl.MarshalAny(foo) +// +// MarshalAny will resolve the correct URL for the type. If the type in +// question implements the proto.Message interface, then it will be marshaled +// as a proto message. Otherwise, it will be marshaled as json. This means that +// typeurl will work on any arbitrary data, whether or not it has a proto +// definition, as long as it can be serialized to json. +// +// To unmarshal, the process is simply inverse: +// +// iface, err := typeurl.UnmarshalAny(anyFoo) +// foo := iface.(*Foo) +// +// The correct type is automatically chosen from the type registry, and the +// returned interface can be cast straight to that type. diff --git a/vendor/github.com/containerd/typeurl/types.go b/vendor/github.com/containerd/typeurl/types.go index 153c488d0a..4f9c069f4d 100644 --- a/vendor/github.com/containerd/typeurl/types.go +++ b/vendor/github.com/containerd/typeurl/types.go @@ -78,7 +78,10 @@ func Is(any *types.Any, v interface{}) bool { return any.TypeUrl == url } -// MarshalAny marshals the value v into an any with the correct TypeUrl +// MarshalAny marshals the value v into an any with the correct TypeUrl. +// If the provided object is already a proto.Any message, then it will be +// returned verbatim. If it is of type proto.Message, it will be marshaled as a +// protocol buffer. Otherwise, the object will be marshaled to json. func MarshalAny(v interface{}) (*types.Any, error) { var marshal func(v interface{}) ([]byte, error) switch t := v.(type) { diff --git a/vendor/github.com/containernetworking/cni/.gitignore b/vendor/github.com/containernetworking/cni/.gitignore deleted file mode 100644 index 0d94fb809e..0000000000 --- a/vendor/github.com/containernetworking/cni/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -bin/ -gopath/ -*.sw[ponm] -.vagrant -release-* diff --git a/vendor/github.com/containernetworking/cni/.travis.yml b/vendor/github.com/containernetworking/cni/.travis.yml deleted file mode 100644 index 234f882684..0000000000 --- a/vendor/github.com/containernetworking/cni/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: go -sudo: required -dist: trusty - -go: - - 1.7.x - - 1.8.x - -env: - global: - - TOOLS_CMD=golang.org/x/tools/cmd - - PATH=$GOROOT/bin:$PATH - - GO15VENDOREXPERIMENT=1 - matrix: - - TARGET=amd64 - - TARGET=arm - - TARGET=arm64 - - TARGET=ppc64le - - TARGET=s390x - -matrix: - fast_finish: true - -install: - - go get ${TOOLS_CMD}/cover - - go get github.com/modocache/gover - - go get github.com/mattn/goveralls - -script: - - > - if [ "${TARGET}" == "amd64" ]; then - GOARCH="${TARGET}" ./test.sh; - else - GOARCH="${TARGET}" ./build.sh; - fi - -notifications: - email: false - -git: - depth: 9999999 diff --git a/vendor/github.com/containernetworking/cni/CODE-OF-CONDUCT.md b/vendor/github.com/containernetworking/cni/CODE-OF-CONDUCT.md deleted file mode 100644 index b6e32163ab..0000000000 --- a/vendor/github.com/containernetworking/cni/CODE-OF-CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -## Community Code of Conduct - -CNI follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). - diff --git a/vendor/github.com/containernetworking/cni/CONTRIBUTING.md b/vendor/github.com/containernetworking/cni/CONTRIBUTING.md deleted file mode 100644 index 817f072afa..0000000000 --- a/vendor/github.com/containernetworking/cni/CONTRIBUTING.md +++ /dev/null @@ -1,125 +0,0 @@ -# How to Contribute - -CNI is [Apache 2.0 licensed](LICENSE) and accepts contributions via GitHub -pull requests. This document outlines some of the conventions on development -workflow, commit message formatting, contact points and other resources to make -it easier to get your contribution accepted. - -We gratefully welcome improvements to documentation as well as to code. - -# Certificate of Origin - -By contributing to this project you agree to the Developer Certificate of -Origin (DCO). This document was created by the Linux Kernel community and is a -simple statement that you, as a contributor, have the legal right to make the -contribution. See the [DCO](DCO) file for details. - -# Email and Chat - -The project uses the the cni-dev email list and IRC chat: -- Email: [cni-dev](https://groups.google.com/forum/#!forum/cni-dev) -- IRC: #[containernetworking](irc://irc.freenode.org:6667/#containernetworking) channel on freenode.org - -Please avoid emailing maintainers found in the MAINTAINERS file directly. They -are very busy and read the mailing lists. - -## Getting Started - -- Fork the repository on GitHub -- Read the [README](README.md) for build and test instructions -- Play with the project, submit bugs, submit pull requests! - -## Contribution workflow - -This is a rough outline of how to prepare a contribution: - -- Create a topic branch from where you want to base your work (usually branched from master). -- Make commits of logical units. -- Make sure your commit messages are in the proper format (see below). -- Push your changes to a topic branch in your fork of the repository. -- If you changed code: - - add automated tests to cover your changes, using the [Ginkgo](http://onsi.github.io/ginkgo/) & [Gomega](http://onsi.github.io/gomega/) style - - if the package did not previously have any test coverage, add it to the list - of `TESTABLE` packages in the `test.sh` script. - - run the full test script and ensure it passes -- Make sure any new code files have a license header (this is now enforced by automated tests) -- Submit a pull request to the original repository. - -## How to run the test suite -We generally require test coverage of any new features or bug fixes. - -Here's how you can run the test suite on any system (even Mac or Windows) using - [Vagrant](https://www.vagrantup.com/) and a hypervisor of your choice: - -```bash -vagrant up -vagrant ssh -# you're now in a shell in a virtual machine -sudo su -cd /go/src/github.com/containernetworking/cni - -# to run the full test suite -./test.sh - -# to focus on a particular test suite -cd plugins/main/loopback -go test -``` - -# Acceptance policy - -These things will make a PR more likely to be accepted: - - * a well-described requirement - * tests for new code - * tests for old code! - * new code and tests follow the conventions in old code and tests - * a good commit message (see below) - -In general, we will merge a PR once two maintainers have endorsed it. -Trivial changes (e.g., corrections to spelling) may get waved through. -For substantial changes, more people may become involved, and you might get asked to resubmit the PR or divide the changes into more than one PR. - -### Format of the Commit Message - -We follow a rough convention for commit messages that is designed to answer two -questions: what changed and why. The subject line should feature the what and -the body of the commit should describe the why. - -``` -scripts: add the test-cluster command - -this uses tmux to setup a test cluster that you can easily kill and -start for debugging. - -Fixes #38 -``` - -The format can be described more formally as follows: - -``` -: - - - -