2018-06-26 20:14:03 +02:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2017-11-17 03:21:41 +01:00
|
|
|
// source: resource.proto
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
package pulumirpc
|
2017-11-17 03:21:41 +01:00
|
|
|
|
|
|
|
import (
|
2020-02-28 12:53:47 +01:00
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
empty "github.com/golang/protobuf/ptypes/empty"
|
|
|
|
_struct "github.com/golang/protobuf/ptypes/struct"
|
2017-11-17 03:21:41 +01:00
|
|
|
grpc "google.golang.org/grpc"
|
2020-02-28 12:53:47 +01:00
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
math "math"
|
2017-11-17 03:21:41 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
2020-02-28 12:53:47 +01:00
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2018-07-12 03:07:50 +02:00
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
// SupportsFeatureRequest allows a client to test if the resource monitor supports a certain feature, which it may use
|
|
|
|
// to control the format or types of messages it sends.
|
|
|
|
type SupportsFeatureRequest struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
2019-04-12 20:27:18 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SupportsFeatureRequest) Reset() { *m = SupportsFeatureRequest{} }
|
|
|
|
func (m *SupportsFeatureRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SupportsFeatureRequest) ProtoMessage() {}
|
|
|
|
func (*SupportsFeatureRequest) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{0}
|
2019-04-12 20:27:18 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
func (m *SupportsFeatureRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SupportsFeatureRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SupportsFeatureRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SupportsFeatureRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *SupportsFeatureRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SupportsFeatureRequest.Merge(m, src)
|
2019-04-12 20:27:18 +02:00
|
|
|
}
|
|
|
|
func (m *SupportsFeatureRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SupportsFeatureRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SupportsFeatureRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SupportsFeatureRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SupportsFeatureRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SupportsFeatureRequest) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type SupportsFeatureResponse struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
HasSupport bool `protobuf:"varint,1,opt,name=hasSupport,proto3" json:"hasSupport,omitempty"`
|
2019-04-12 20:27:18 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SupportsFeatureResponse) Reset() { *m = SupportsFeatureResponse{} }
|
|
|
|
func (m *SupportsFeatureResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SupportsFeatureResponse) ProtoMessage() {}
|
|
|
|
func (*SupportsFeatureResponse) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{1}
|
2019-04-12 20:27:18 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
func (m *SupportsFeatureResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SupportsFeatureResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SupportsFeatureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SupportsFeatureResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *SupportsFeatureResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SupportsFeatureResponse.Merge(m, src)
|
2019-04-12 20:27:18 +02:00
|
|
|
}
|
|
|
|
func (m *SupportsFeatureResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SupportsFeatureResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SupportsFeatureResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SupportsFeatureResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SupportsFeatureResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SupportsFeatureResponse) GetHasSupport() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.HasSupport
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-04-05 18:48:09 +02:00
|
|
|
// ReadResourceRequest contains enough information to uniquely qualify and read a resource's state.
|
|
|
|
type ReadResourceRequest struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,5,opt,name=properties,proto3" json:"properties,omitempty"`
|
|
|
|
Dependencies []string `protobuf:"bytes,6,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
|
|
|
|
Provider string `protobuf:"bytes,7,opt,name=provider,proto3" json:"provider,omitempty"`
|
|
|
|
Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"`
|
|
|
|
AcceptSecrets bool `protobuf:"varint,9,opt,name=acceptSecrets,proto3" json:"acceptSecrets,omitempty"`
|
|
|
|
AdditionalSecretOutputs []string `protobuf:"bytes,10,rep,name=additionalSecretOutputs,proto3" json:"additionalSecretOutputs,omitempty"`
|
|
|
|
Aliases []string `protobuf:"bytes,11,rep,name=aliases,proto3" json:"aliases,omitempty"`
|
2020-10-27 18:12:12 +01:00
|
|
|
AcceptResources bool `protobuf:"varint,12,opt,name=acceptResources,proto3" json:"acceptResources,omitempty"`
|
2019-05-09 23:27:34 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResourceRequest) Reset() { *m = ReadResourceRequest{} }
|
|
|
|
func (m *ReadResourceRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReadResourceRequest) ProtoMessage() {}
|
|
|
|
func (*ReadResourceRequest) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{2}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *ReadResourceRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReadResourceRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReadResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReadResourceRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *ReadResourceRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReadResourceRequest.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
func (m *ReadResourceRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReadResourceRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReadResourceRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReadResourceRequest.DiscardUnknown(m)
|
2018-04-05 18:48:09 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
var xxx_messageInfo_ReadResourceRequest proto.InternalMessageInfo
|
2018-04-05 18:48:09 +02:00
|
|
|
|
|
|
|
func (m *ReadResourceRequest) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResourceRequest) GetType() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResourceRequest) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResourceRequest) GetParent() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Parent
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *ReadResourceRequest) GetProperties() *_struct.Struct {
|
2018-04-05 18:48:09 +02:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-08-03 23:06:00 +02:00
|
|
|
func (m *ReadResourceRequest) GetDependencies() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Dependencies
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 02:50:29 +02:00
|
|
|
func (m *ReadResourceRequest) GetProvider() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Provider
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-04-16 19:06:43 +02:00
|
|
|
func (m *ReadResourceRequest) GetVersion() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
func (m *ReadResourceRequest) GetAcceptSecrets() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.AcceptSecrets
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-05-09 23:27:34 +02:00
|
|
|
func (m *ReadResourceRequest) GetAdditionalSecretOutputs() []string {
|
2019-04-23 02:03:08 +02:00
|
|
|
if m != nil {
|
2019-05-09 23:27:34 +02:00
|
|
|
return m.AdditionalSecretOutputs
|
2019-04-23 02:03:08 +02:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-06-01 08:01:01 +02:00
|
|
|
func (m *ReadResourceRequest) GetAliases() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Aliases
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-10-27 18:12:12 +01:00
|
|
|
func (m *ReadResourceRequest) GetAcceptResources() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.AcceptResources
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-04-05 18:48:09 +02:00
|
|
|
// ReadResourceResponse contains the result of reading a resource's state.
|
|
|
|
type ReadResourceResponse struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
|
2018-07-12 03:07:50 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-04-05 18:48:09 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *ReadResourceResponse) Reset() { *m = ReadResourceResponse{} }
|
|
|
|
func (m *ReadResourceResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReadResourceResponse) ProtoMessage() {}
|
|
|
|
func (*ReadResourceResponse) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{3}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *ReadResourceResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReadResourceResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReadResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReadResourceResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *ReadResourceResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReadResourceResponse.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
func (m *ReadResourceResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReadResourceResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReadResourceResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReadResourceResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ReadResourceResponse proto.InternalMessageInfo
|
2018-04-05 18:48:09 +02:00
|
|
|
|
|
|
|
func (m *ReadResourceResponse) GetUrn() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *ReadResourceResponse) GetProperties() *_struct.Struct {
|
2018-04-05 18:48:09 +02:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
// RegisterResourceRequest contains information about a resource object that was newly allocated.
|
|
|
|
type RegisterResourceRequest struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
|
|
|
|
Custom bool `protobuf:"varint,4,opt,name=custom,proto3" json:"custom,omitempty"`
|
|
|
|
Object *_struct.Struct `protobuf:"bytes,5,opt,name=object,proto3" json:"object,omitempty"`
|
|
|
|
Protect bool `protobuf:"varint,6,opt,name=protect,proto3" json:"protect,omitempty"`
|
|
|
|
Dependencies []string `protobuf:"bytes,7,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
|
|
|
|
Provider string `protobuf:"bytes,8,opt,name=provider,proto3" json:"provider,omitempty"`
|
|
|
|
PropertyDependencies map[string]*RegisterResourceRequest_PropertyDependencies `protobuf:"bytes,9,rep,name=propertyDependencies,proto3" json:"propertyDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
DeleteBeforeReplace bool `protobuf:"varint,10,opt,name=deleteBeforeReplace,proto3" json:"deleteBeforeReplace,omitempty"`
|
|
|
|
Version string `protobuf:"bytes,11,opt,name=version,proto3" json:"version,omitempty"`
|
|
|
|
IgnoreChanges []string `protobuf:"bytes,12,rep,name=ignoreChanges,proto3" json:"ignoreChanges,omitempty"`
|
|
|
|
AcceptSecrets bool `protobuf:"varint,13,opt,name=acceptSecrets,proto3" json:"acceptSecrets,omitempty"`
|
|
|
|
AdditionalSecretOutputs []string `protobuf:"bytes,14,rep,name=additionalSecretOutputs,proto3" json:"additionalSecretOutputs,omitempty"`
|
|
|
|
Aliases []string `protobuf:"bytes,15,rep,name=aliases,proto3" json:"aliases,omitempty"`
|
|
|
|
ImportId string `protobuf:"bytes,16,opt,name=importId,proto3" json:"importId,omitempty"`
|
|
|
|
CustomTimeouts *RegisterResourceRequest_CustomTimeouts `protobuf:"bytes,17,opt,name=customTimeouts,proto3" json:"customTimeouts,omitempty"`
|
|
|
|
DeleteBeforeReplaceDefined bool `protobuf:"varint,18,opt,name=deleteBeforeReplaceDefined,proto3" json:"deleteBeforeReplaceDefined,omitempty"`
|
|
|
|
SupportsPartialValues bool `protobuf:"varint,19,opt,name=supportsPartialValues,proto3" json:"supportsPartialValues,omitempty"`
|
2020-09-30 23:09:20 +02:00
|
|
|
Remote bool `protobuf:"varint,20,opt,name=remote,proto3" json:"remote,omitempty"`
|
2020-10-27 18:12:12 +01:00
|
|
|
AcceptResources bool `protobuf:"varint,21,opt,name=acceptResources,proto3" json:"acceptResources,omitempty"`
|
2019-08-21 00:51:02 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceRequest) Reset() { *m = RegisterResourceRequest{} }
|
|
|
|
func (m *RegisterResourceRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*RegisterResourceRequest) ProtoMessage() {}
|
|
|
|
func (*RegisterResourceRequest) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{4}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *RegisterResourceRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_RegisterResourceRequest.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_RegisterResourceRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_RegisterResourceRequest proto.InternalMessageInfo
|
2017-11-17 03:21:41 +01:00
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceRequest) GetType() string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceRequest) GetName() string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceRequest) GetParent() string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Parent
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceRequest) GetCustom() bool {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Custom
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceRequest) GetObject() *_struct.Struct {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Object
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Implement resource protection (#751)
This change implements resource protection, as per pulumi/pulumi#689.
The overall idea is that a resource can be marked as "protect: true",
which will prevent deletion of that resource for any reason whatsoever
(straight deletion, replacement, etc). This is expressed in the
program. To "unprotect" a resource, one must perform an update setting
"protect: false", and then afterwards, they can delete the resource.
For example:
let res = new MyResource("precious", { .. }, { protect: true });
Afterwards, the resource will display in the CLI with a lock icon, and
any attempts to remove it will fail in the usual ways (in planning or,
worst case, during an actual update).
This was done by adding a new ResourceOptions bag parameter to the
base Resource types. This is unfortunately a breaking change, but now
is the right time to take this one. We had been adding new settings
one by one -- like parent and dependsOn -- and this new approach will
set us up to add any number of additional settings down the road,
without needing to worry about breaking anything ever again.
This is related to protected stacks, as described in
pulumi/pulumi-service#399. Most likely this will serve as a foundational
building block that enables the coarser grained policy management.
2017-12-20 23:31:07 +01:00
|
|
|
func (m *RegisterResourceRequest) GetProtect() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Protect
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-02-22 00:11:21 +01:00
|
|
|
func (m *RegisterResourceRequest) GetDependencies() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Dependencies
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 02:50:29 +02:00
|
|
|
func (m *RegisterResourceRequest) GetProvider() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Provider
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
func (m *RegisterResourceRequest) GetPropertyDependencies() map[string]*RegisterResourceRequest_PropertyDependencies {
|
|
|
|
if m != nil {
|
|
|
|
return m.PropertyDependencies
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-01-31 23:27:53 +01:00
|
|
|
func (m *RegisterResourceRequest) GetDeleteBeforeReplace() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.DeleteBeforeReplace
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-04-16 19:06:43 +02:00
|
|
|
func (m *RegisterResourceRequest) GetVersion() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-04-22 22:54:48 +02:00
|
|
|
func (m *RegisterResourceRequest) GetIgnoreChanges() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.IgnoreChanges
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
func (m *RegisterResourceRequest) GetAcceptSecrets() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.AcceptSecrets
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-05-09 23:27:34 +02:00
|
|
|
func (m *RegisterResourceRequest) GetAdditionalSecretOutputs() []string {
|
2019-04-23 02:03:08 +02:00
|
|
|
if m != nil {
|
2019-05-09 23:27:34 +02:00
|
|
|
return m.AdditionalSecretOutputs
|
2019-04-23 02:03:08 +02:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-06-01 08:01:01 +02:00
|
|
|
func (m *RegisterResourceRequest) GetAliases() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Aliases
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-07-12 20:12:01 +02:00
|
|
|
func (m *RegisterResourceRequest) GetImportId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ImportId
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
func (m *RegisterResourceRequest) GetCustomTimeouts() *RegisterResourceRequest_CustomTimeouts {
|
|
|
|
if m != nil {
|
|
|
|
return m.CustomTimeouts
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-08-21 00:51:02 +02:00
|
|
|
func (m *RegisterResourceRequest) GetDeleteBeforeReplaceDefined() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.DeleteBeforeReplaceDefined
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
Propagate inputs to outputs during preview. (#3327)
These changes restore a more-correct version of the behavior that was
disabled with #3014. The original implementation of this behavior was
done in the SDKs, which do not have access to the complete inputs for a
resource (in particular, default values filled in by the provider during
`Check` are not exposed to the SDK). This lack of information meant that
the resolved output values could disagree with the typings present in
a provider SDK. Exacerbating this problem was the fact that unknown
values were dropped entirely, causing `undefined` values to appear in
unexpected places.
By doing this in the engine and allowing unknown values to be
represented in a first-class manner in the SDK, we can attack both of
these issues.
Although this behavior is not _strictly_ consistent with respect to the
resource model--in an update, a resource's output properties will come
from its provider and may differ from its input properties--this
behavior was present in the product for a fairly long time without
significant issues. In the future, we may be able to improve the
accuracy of resource outputs during a preview by allowing the provider
to dry-run CRUD operations and return partially-known values where
possible.
These changes also introduce new APIs in the Node and Python SDKs
that work with unknown values in a first-class fashion:
- A new parameter to the `apply` function that indicates that the
callback should be run even if the result of the apply contains
unknown values
- `containsUnknowns` and `isUnknown`, which return true if a value
either contains nested unknown values or is exactly an unknown value
- The `Unknown` type, which represents unknown values
The primary use case for these APIs is to allow nested, properties with
known values to be accessed via the lifted property accessor even when
the containing property is not fully know. A common example of this
pattern is the `metadata.name` property of a Kubernetes `Namespace`
object: while other properties of the `metadata` bag may be unknown,
`name` is often known. These APIs allow `ns.metadata.name` to return a
known value in this case.
In order to avoid exposing downlevel SDKs to unknown values--a change
which could break user code by exposing it to unexpected values--a
language SDK must indicate whether or not it supports first-class
unknown values as part of each `RegisterResourceRequest`.
These changes also allow us to avoid breaking user code with the new
behavior introduced by the prior commit.
Fixes #3190.
2019-11-11 21:09:34 +01:00
|
|
|
func (m *RegisterResourceRequest) GetSupportsPartialValues() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.SupportsPartialValues
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
func (m *RegisterResourceRequest) GetRemote() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Remote
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-10-27 18:12:12 +01:00
|
|
|
func (m *RegisterResourceRequest) GetAcceptResources() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.AcceptResources
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
// PropertyDependencies describes the resources that a particular property depends on.
|
|
|
|
type RegisterResourceRequest_PropertyDependencies struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) Reset() {
|
|
|
|
*m = RegisterResourceRequest_PropertyDependencies{}
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) String() string {
|
|
|
|
return proto.CompactTextString(m)
|
|
|
|
}
|
|
|
|
func (*RegisterResourceRequest_PropertyDependencies) ProtoMessage() {}
|
|
|
|
func (*RegisterResourceRequest_PropertyDependencies) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{4, 0}
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest_PropertyDependencies.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest_PropertyDependencies.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_RegisterResourceRequest_PropertyDependencies.Merge(m, src)
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest_PropertyDependencies.Size(m)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_RegisterResourceRequest_PropertyDependencies.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_RegisterResourceRequest_PropertyDependencies proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *RegisterResourceRequest_PropertyDependencies) GetUrns() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urns
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
// CustomTimeouts allows a user to be able to create a set of custom timeout parameters.
|
|
|
|
type RegisterResourceRequest_CustomTimeouts struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Create string `protobuf:"bytes,1,opt,name=create,proto3" json:"create,omitempty"`
|
|
|
|
Update string `protobuf:"bytes,2,opt,name=update,proto3" json:"update,omitempty"`
|
|
|
|
Delete string `protobuf:"bytes,3,opt,name=delete,proto3" json:"delete,omitempty"`
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) Reset() {
|
|
|
|
*m = RegisterResourceRequest_CustomTimeouts{}
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*RegisterResourceRequest_CustomTimeouts) ProtoMessage() {}
|
|
|
|
func (*RegisterResourceRequest_CustomTimeouts) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{4, 1}
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest_CustomTimeouts.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest_CustomTimeouts.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_RegisterResourceRequest_CustomTimeouts.Merge(m, src)
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_RegisterResourceRequest_CustomTimeouts.Size(m)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_RegisterResourceRequest_CustomTimeouts.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_RegisterResourceRequest_CustomTimeouts proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) GetCreate() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Create
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) GetUpdate() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Update
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceRequest_CustomTimeouts) GetDelete() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Delete
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
// RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the
|
|
|
|
// auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine.
|
|
|
|
type RegisterResourceResponse struct {
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
|
|
|
|
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
Object *_struct.Struct `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"`
|
|
|
|
Stable bool `protobuf:"varint,4,opt,name=stable,proto3" json:"stable,omitempty"`
|
|
|
|
Stables []string `protobuf:"bytes,5,rep,name=stables,proto3" json:"stables,omitempty"`
|
|
|
|
PropertyDependencies map[string]*RegisterResourceResponse_PropertyDependencies `protobuf:"bytes,6,rep,name=propertyDependencies,proto3" json:"propertyDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceResponse) Reset() { *m = RegisterResourceResponse{} }
|
|
|
|
func (m *RegisterResourceResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*RegisterResourceResponse) ProtoMessage() {}
|
|
|
|
func (*RegisterResourceResponse) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{5}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_RegisterResourceResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_RegisterResourceResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *RegisterResourceResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_RegisterResourceResponse.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_RegisterResourceResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_RegisterResourceResponse.DiscardUnknown(m)
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
var xxx_messageInfo_RegisterResourceResponse proto.InternalMessageInfo
|
2017-11-17 03:21:41 +01:00
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceResponse) GetUrn() string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
2017-11-21 02:38:09 +01:00
|
|
|
return m.Urn
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceResponse) GetId() string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return m.Id
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceResponse) GetObject() *_struct.Struct {
|
2017-11-21 02:38:09 +01:00
|
|
|
if m != nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return m.Object
|
2017-11-21 02:38:09 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceResponse) GetStable() bool {
|
2017-11-21 02:38:09 +01:00
|
|
|
if m != nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return m.Stable
|
2017-11-21 02:38:09 +01:00
|
|
|
}
|
2017-11-29 20:27:32 +01:00
|
|
|
return false
|
2017-11-21 02:38:09 +01:00
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (m *RegisterResourceResponse) GetStables() []string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return m.Stables
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
func (m *RegisterResourceResponse) GetPropertyDependencies() map[string]*RegisterResourceResponse_PropertyDependencies {
|
|
|
|
if m != nil {
|
|
|
|
return m.PropertyDependencies
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// PropertyDependencies describes the resources that a particular property depends on.
|
|
|
|
type RegisterResourceResponse_PropertyDependencies struct {
|
|
|
|
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) Reset() {
|
|
|
|
*m = RegisterResourceResponse_PropertyDependencies{}
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) String() string {
|
|
|
|
return proto.CompactTextString(m)
|
|
|
|
}
|
|
|
|
func (*RegisterResourceResponse_PropertyDependencies) ProtoMessage() {}
|
|
|
|
func (*RegisterResourceResponse_PropertyDependencies) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{5, 0}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_RegisterResourceResponse_PropertyDependencies.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_RegisterResourceResponse_PropertyDependencies.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_RegisterResourceResponse_PropertyDependencies.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_RegisterResourceResponse_PropertyDependencies.Size(m)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_RegisterResourceResponse_PropertyDependencies.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_RegisterResourceResponse_PropertyDependencies proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *RegisterResourceResponse_PropertyDependencies) GetUrns() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urns
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
// RegisterResourceOutputsRequest adds extra resource outputs created by the program after registration has occurred.
|
|
|
|
type RegisterResourceOutputsRequest struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
|
|
|
|
Outputs *_struct.Struct `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"`
|
2018-07-12 03:07:50 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RegisterResourceOutputsRequest) Reset() { *m = RegisterResourceOutputsRequest{} }
|
|
|
|
func (m *RegisterResourceOutputsRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*RegisterResourceOutputsRequest) ProtoMessage() {}
|
|
|
|
func (*RegisterResourceOutputsRequest) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_d1b72f771c35e3b8, []int{6}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceOutputsRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_RegisterResourceOutputsRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceOutputsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_RegisterResourceOutputsRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *RegisterResourceOutputsRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_RegisterResourceOutputsRequest.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
func (m *RegisterResourceOutputsRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_RegisterResourceOutputsRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *RegisterResourceOutputsRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_RegisterResourceOutputsRequest.DiscardUnknown(m)
|
2017-11-29 20:27:32 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
var xxx_messageInfo_RegisterResourceOutputsRequest proto.InternalMessageInfo
|
2017-11-29 20:27:32 +01:00
|
|
|
|
|
|
|
func (m *RegisterResourceOutputsRequest) GetUrn() string {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return m.Urn
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
2017-11-29 20:27:32 +01:00
|
|
|
return ""
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *RegisterResourceOutputsRequest) GetOutputs() *_struct.Struct {
|
2017-11-17 03:21:41 +01:00
|
|
|
if m != nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return m.Outputs
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2019-04-12 20:27:18 +02:00
|
|
|
proto.RegisterType((*SupportsFeatureRequest)(nil), "pulumirpc.SupportsFeatureRequest")
|
|
|
|
proto.RegisterType((*SupportsFeatureResponse)(nil), "pulumirpc.SupportsFeatureResponse")
|
2018-04-05 18:48:09 +02:00
|
|
|
proto.RegisterType((*ReadResourceRequest)(nil), "pulumirpc.ReadResourceRequest")
|
|
|
|
proto.RegisterType((*ReadResourceResponse)(nil), "pulumirpc.ReadResourceResponse")
|
2017-11-29 20:27:32 +01:00
|
|
|
proto.RegisterType((*RegisterResourceRequest)(nil), "pulumirpc.RegisterResourceRequest")
|
Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.
We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.
This is perhaps clearer when described by example. Consider the
following dependency graph:
A
__|__
B C
| _|_
D E F
In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.
In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 18:46:30 +01:00
|
|
|
proto.RegisterMapType((map[string]*RegisterResourceRequest_PropertyDependencies)(nil), "pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry")
|
|
|
|
proto.RegisterType((*RegisterResourceRequest_PropertyDependencies)(nil), "pulumirpc.RegisterResourceRequest.PropertyDependencies")
|
Addition of Custom Timeouts (#2885)
* Plumbing the custom timeouts from the engine to the providers
* Plumbing the CustomTimeouts through to the engine and adding test to show this
* Change the provider proto to include individual timeouts
* Plumbing the CustomTimeouts from the engine through to the Provider RPC interface
* Change how the CustomTimeouts are sent across RPC
These errors were spotted in testing. We can now see that the timeout
information is arriving in the RegisterResourceRequest
```
req=&pulumirpc.RegisterResourceRequest{
Type: "aws:s3/bucket:Bucket",
Name: "my-bucket",
Parent: "urn:pulumi:dev::aws-vpc::pulumi:pulumi:Stack::aws-vpc-dev",
Custom: true,
Object: &structpb.Struct{},
Protect: false,
Dependencies: nil,
Provider: "",
PropertyDependencies: {},
DeleteBeforeReplace: false,
Version: "",
IgnoreChanges: nil,
AcceptSecrets: true,
AdditionalSecretOutputs: nil,
Aliases: nil,
CustomTimeouts: &pulumirpc.RegisterResourceRequest_CustomTimeouts{
Create: 300,
Update: 400,
Delete: 500,
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
},
XXX_NoUnkeyedLiteral: struct {}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
```
* Changing the design to use strings
* CHANGELOG entry to include the CustomTimeouts work
* Changing custom timeouts to be passed around the engine as converted value
We don't want to pass around strings - the user can provide it but we want
to make the engine aware of the timeout in seconds as a float64
2019-07-15 23:26:28 +02:00
|
|
|
proto.RegisterType((*RegisterResourceRequest_CustomTimeouts)(nil), "pulumirpc.RegisterResourceRequest.CustomTimeouts")
|
2017-11-29 20:27:32 +01:00
|
|
|
proto.RegisterType((*RegisterResourceResponse)(nil), "pulumirpc.RegisterResourceResponse")
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
proto.RegisterMapType((map[string]*RegisterResourceResponse_PropertyDependencies)(nil), "pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry")
|
|
|
|
proto.RegisterType((*RegisterResourceResponse_PropertyDependencies)(nil), "pulumirpc.RegisterResourceResponse.PropertyDependencies")
|
2017-11-29 20:27:32 +01:00
|
|
|
proto.RegisterType((*RegisterResourceOutputsRequest)(nil), "pulumirpc.RegisterResourceOutputsRequest")
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
func init() { proto.RegisterFile("resource.proto", fileDescriptor_d1b72f771c35e3b8) }
|
|
|
|
|
|
|
|
var fileDescriptor_d1b72f771c35e3b8 = []byte{
|
2020-10-27 18:12:12 +01:00
|
|
|
// 943 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6f, 0x1c, 0x35,
|
|
|
|
0x14, 0xcf, 0xee, 0xa6, 0x93, 0xdd, 0x97, 0x74, 0x13, 0x9c, 0x34, 0x71, 0x07, 0x14, 0xc2, 0xc0,
|
|
|
|
0x61, 0xe1, 0xb0, 0x69, 0x03, 0x52, 0x03, 0xe2, 0x43, 0xa2, 0x2d, 0xa8, 0x87, 0x42, 0x99, 0x20,
|
|
|
|
0x04, 0x48, 0x20, 0x39, 0x33, 0x2f, 0xdb, 0x21, 0xb3, 0x63, 0xd7, 0xf6, 0x44, 0xda, 0x1b, 0x1c,
|
|
|
|
0xb9, 0x72, 0xe6, 0xaf, 0xe1, 0x2f, 0x43, 0xb6, 0x67, 0x96, 0x9d, 0x8f, 0x4d, 0x36, 0xe5, 0xe6,
|
|
|
|
0xf7, 0x69, 0xfb, 0xf7, 0x7e, 0xef, 0xd9, 0x30, 0x94, 0xa8, 0x78, 0x2e, 0x23, 0x1c, 0x0b, 0xc9,
|
|
|
|
0x35, 0x27, 0x03, 0x91, 0xa7, 0xf9, 0x34, 0x91, 0x22, 0xf2, 0xdf, 0x9c, 0x70, 0x3e, 0x49, 0xf1,
|
|
|
|
0xd8, 0x1a, 0xce, 0xf3, 0x8b, 0x63, 0x9c, 0x0a, 0x3d, 0x73, 0x7e, 0xfe, 0x5b, 0x75, 0xa3, 0xd2,
|
|
|
|
0x32, 0x8f, 0x74, 0x61, 0x1d, 0x0a, 0xc9, 0xaf, 0x92, 0x18, 0xa5, 0x93, 0x83, 0x11, 0xec, 0x9f,
|
|
|
|
0xe5, 0x42, 0x70, 0xa9, 0xd5, 0x57, 0xc8, 0x74, 0x2e, 0x31, 0xc4, 0x57, 0x39, 0x2a, 0x4d, 0x86,
|
|
|
|
0xd0, 0x4d, 0x62, 0xda, 0x39, 0xea, 0x8c, 0x06, 0x61, 0x37, 0x89, 0x83, 0x8f, 0xe1, 0xa0, 0xe1,
|
|
|
|
0xa9, 0x04, 0xcf, 0x14, 0x92, 0x43, 0x80, 0x97, 0x4c, 0x15, 0x56, 0x1b, 0xd2, 0x0f, 0x17, 0x34,
|
|
|
|
0xc1, 0xdf, 0x3d, 0xd8, 0x0d, 0x91, 0xc5, 0x61, 0x71, 0xa3, 0x25, 0x5b, 0x10, 0x02, 0xeb, 0x7a,
|
|
|
|
0x26, 0x90, 0x76, 0xad, 0xc6, 0xae, 0x8d, 0x2e, 0x63, 0x53, 0xa4, 0x3d, 0xa7, 0x33, 0x6b, 0xb2,
|
|
|
|
0x0f, 0x9e, 0x60, 0x12, 0x33, 0x4d, 0xd7, 0xad, 0xb6, 0x90, 0xc8, 0x23, 0x00, 0x21, 0xb9, 0x40,
|
|
|
|
0xa9, 0x13, 0x54, 0xf4, 0xce, 0x51, 0x67, 0xb4, 0x79, 0x72, 0x30, 0x76, 0x78, 0x8c, 0x4b, 0x3c,
|
|
|
|
0xc6, 0x67, 0x16, 0x8f, 0x70, 0xc1, 0x95, 0x04, 0xb0, 0x15, 0xa3, 0xc0, 0x2c, 0xc6, 0x2c, 0x32,
|
|
|
|
0xa1, 0xde, 0x51, 0x6f, 0x34, 0x08, 0x2b, 0x3a, 0xe2, 0x43, 0xbf, 0xc4, 0x8e, 0x6e, 0xd8, 0x6d,
|
|
|
|
0xe7, 0x32, 0xa1, 0xb0, 0x71, 0x85, 0x52, 0x25, 0x3c, 0xa3, 0x7d, 0x6b, 0x2a, 0x45, 0xf2, 0x1e,
|
|
|
|
0xdc, 0x65, 0x51, 0x84, 0x42, 0x9f, 0x61, 0x24, 0x51, 0x2b, 0x3a, 0xb0, 0xe8, 0x54, 0x95, 0xe4,
|
|
|
|
0x14, 0x0e, 0x58, 0x1c, 0x27, 0x3a, 0xe1, 0x19, 0x4b, 0x9d, 0xf2, 0xdb, 0x5c, 0x8b, 0x5c, 0x2b,
|
|
|
|
0x0a, 0xf6, 0x28, 0xcb, 0xcc, 0x66, 0x67, 0x96, 0x26, 0x4c, 0xa1, 0xa2, 0x9b, 0xd6, 0xb3, 0x14,
|
|
|
|
0xc9, 0x08, 0xb6, 0xdd, 0x26, 0x25, 0xea, 0x8a, 0x6e, 0xd9, 0xbd, 0xeb, 0xea, 0x80, 0xc1, 0x5e,
|
|
|
|
0xb5, 0x3a, 0x45, 0x59, 0x77, 0xa0, 0x97, 0xcb, 0xac, 0xa8, 0x8f, 0x59, 0xd6, 0x00, 0xee, 0xae,
|
|
|
|
0x0c, 0x70, 0xf0, 0xd7, 0x00, 0x0e, 0x42, 0x9c, 0x24, 0x4a, 0xa3, 0xac, 0xb3, 0xa0, 0xac, 0x7a,
|
|
|
|
0xa7, 0xa5, 0xea, 0xdd, 0xd6, 0xaa, 0xf7, 0x2a, 0x55, 0xdf, 0x07, 0x2f, 0xca, 0x95, 0xe6, 0x53,
|
|
|
|
0xcb, 0x86, 0x7e, 0x58, 0x48, 0xe4, 0x18, 0x3c, 0x7e, 0xfe, 0x1b, 0x46, 0xfa, 0x26, 0x26, 0x14,
|
|
|
|
0x6e, 0x06, 0x4b, 0x63, 0x32, 0x11, 0x9e, 0xcd, 0x54, 0x8a, 0x0d, 0x7e, 0x6c, 0xdc, 0xc0, 0x8f,
|
|
|
|
0x7e, 0x8d, 0x1f, 0x02, 0xf6, 0x0a, 0x30, 0x66, 0x4f, 0x16, 0xf3, 0x0c, 0x8e, 0x7a, 0xa3, 0xcd,
|
|
|
|
0x93, 0x4f, 0xc7, 0xf3, 0xd6, 0x1e, 0x2f, 0x01, 0x69, 0xfc, 0xa2, 0x25, 0xfc, 0x69, 0xa6, 0xe5,
|
|
|
|
0x2c, 0x6c, 0xcd, 0x4c, 0x1e, 0xc0, 0x6e, 0x8c, 0x29, 0x6a, 0xfc, 0x12, 0x2f, 0xb8, 0x69, 0x55,
|
|
|
|
0x91, 0xb2, 0x08, 0x29, 0xd8, 0x7b, 0xb5, 0x99, 0x16, 0x39, 0xbc, 0xd9, 0xe0, 0x70, 0x32, 0xc9,
|
|
|
|
0xb8, 0xc4, 0xc7, 0x2f, 0x59, 0x36, 0xb1, 0x3c, 0x32, 0xd7, 0xaf, 0x2a, 0x9b, 0x4c, 0xbf, 0x7b,
|
|
|
|
0x4b, 0xa6, 0x0f, 0x57, 0x66, 0xfa, 0x76, 0x95, 0xe9, 0x3e, 0xf4, 0x93, 0xa9, 0x19, 0x34, 0xcf,
|
|
|
|
0x62, 0xba, 0xe3, 0x90, 0x2f, 0x65, 0xf2, 0x13, 0x0c, 0x1d, 0x1d, 0xbe, 0x4f, 0xa6, 0xc8, 0xcd,
|
|
|
|
0x36, 0x6f, 0x58, 0x32, 0x3c, 0x5c, 0x01, 0xf3, 0xc7, 0x95, 0xc0, 0xb0, 0x96, 0x88, 0x7c, 0x0e,
|
|
|
|
0x7e, 0x0b, 0x8e, 0x4f, 0xf0, 0x22, 0xc9, 0x30, 0xa6, 0xc4, 0xde, 0xfe, 0x1a, 0x0f, 0xf2, 0x11,
|
|
|
|
0xdc, 0x53, 0xc5, 0x40, 0x7d, 0xc1, 0xa4, 0x4e, 0x58, 0xfa, 0x03, 0x4b, 0x73, 0x54, 0x74, 0xd7,
|
|
|
|
0x86, 0xb6, 0x1b, 0x0d, 0xdb, 0x25, 0x4e, 0xb9, 0x46, 0xba, 0xe7, 0xd8, 0xee, 0xa4, 0xb6, 0x76,
|
|
|
|
0xbf, 0xd7, 0xda, 0xee, 0xfe, 0x07, 0xb0, 0xd7, 0xc6, 0x26, 0xd3, 0x73, 0xb9, 0xcc, 0x14, 0xed,
|
|
|
|
0x58, 0x74, 0xed, 0xda, 0xff, 0x11, 0x86, 0x55, 0x14, 0x6c, 0xb7, 0x49, 0x64, 0xba, 0xec, 0xd7,
|
|
|
|
0x42, 0x32, 0xfa, 0x5c, 0xc4, 0x46, 0xef, 0x7a, 0xb6, 0x90, 0x8c, 0xde, 0x61, 0x50, 0x76, 0xad,
|
|
|
|
0x93, 0xfc, 0xdf, 0x3b, 0x70, 0x7f, 0x29, 0xa9, 0xcd, 0xe8, 0xb9, 0xc4, 0x59, 0x39, 0x7a, 0x2e,
|
|
|
|
0x71, 0x46, 0x9e, 0xc3, 0x9d, 0x2b, 0x83, 0x40, 0x31, 0x75, 0x1e, 0xbd, 0x66, 0xcf, 0x84, 0x2e,
|
|
|
|
0xcb, 0x27, 0xdd, 0xd3, 0x4e, 0xf0, 0x4f, 0x0f, 0x68, 0x33, 0x76, 0xe9, 0xf0, 0x73, 0xaf, 0x55,
|
|
|
|
0x77, 0xfe, 0x5a, 0xfd, 0x37, 0x5f, 0x7a, 0xab, 0xcd, 0x97, 0x7d, 0xf0, 0x94, 0x66, 0xe7, 0x29,
|
|
|
|
0x96, 0x83, 0xca, 0x49, 0x86, 0xd9, 0x6e, 0x65, 0xde, 0x2c, 0xcb, 0xec, 0x42, 0x24, 0xaf, 0x96,
|
|
|
|
0xcc, 0x0d, 0xcf, 0xce, 0x8d, 0xcf, 0xae, 0xc5, 0xc0, 0xdd, 0xe3, 0xb6, 0x83, 0xe3, 0x56, 0xec,
|
|
|
|
0xf8, 0xe3, 0x96, 0x35, 0xfc, 0xa6, 0x5a, 0xc3, 0xd3, 0xd7, 0x3d, 0xff, 0x62, 0x11, 0x11, 0x0e,
|
|
|
|
0xeb, 0xb1, 0xc5, 0xc4, 0x28, 0xdf, 0x97, 0x66, 0x25, 0x1f, 0xc2, 0x06, 0x2f, 0x86, 0xce, 0x0d,
|
|
|
|
0x6f, 0x58, 0xe9, 0x77, 0xf2, 0xe7, 0x3a, 0x6c, 0x97, 0xf9, 0x9f, 0xf3, 0x2c, 0xd1, 0x5c, 0x92,
|
|
|
|
0x9f, 0x61, 0xbb, 0xf6, 0x23, 0x22, 0xef, 0x2c, 0x5c, 0xa9, 0xfd, 0x5f, 0xe5, 0x07, 0xd7, 0xb9,
|
|
|
|
0xb8, 0x4b, 0x07, 0x6b, 0xe4, 0x0b, 0xf0, 0x9e, 0x65, 0x57, 0xfc, 0x12, 0x09, 0x5d, 0xf0, 0x77,
|
|
|
|
0xaa, 0x32, 0xd3, 0xfd, 0x16, 0xcb, 0x3c, 0xc1, 0xd7, 0xb0, 0x75, 0xa6, 0x25, 0xb2, 0xe9, 0xff,
|
|
|
|
0x4a, 0xf3, 0xa0, 0x43, 0xbe, 0x83, 0xad, 0xc5, 0xdf, 0x01, 0x39, 0xac, 0x54, 0xad, 0xf1, 0xa9,
|
|
|
|
0xf3, 0xdf, 0x5e, 0x6a, 0x9f, 0x9f, 0xed, 0x17, 0xd8, 0xa9, 0xd7, 0x8c, 0x04, 0x37, 0x37, 0xb4,
|
|
|
|
0xff, 0xee, 0x0a, 0x84, 0x09, 0xd6, 0xc8, 0xaf, 0xcd, 0xbf, 0x46, 0xf9, 0x88, 0xbc, 0x7f, 0x4d,
|
|
|
|
0x86, 0x2a, 0x6d, 0xfc, 0xfd, 0x06, 0x27, 0x9e, 0x9a, 0x5f, 0x76, 0xb0, 0x76, 0xee, 0x59, 0xcd,
|
|
|
|
0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x70, 0x3e, 0x80, 0x35, 0xa2, 0x0b, 0x00, 0x00,
|
2020-02-28 12:53:47 +01:00
|
|
|
}
|
|
|
|
|
2017-11-17 03:21:41 +01:00
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
2020-02-28 12:53:47 +01:00
|
|
|
var _ grpc.ClientConnInterface
|
2017-11-17 03:21:41 +01:00
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
2020-02-28 12:53:47 +01:00
|
|
|
const _ = grpc.SupportPackageIsVersion6
|
2018-06-30 01:14:49 +02:00
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
// ResourceMonitorClient is the client API for ResourceMonitor service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
2017-11-17 03:21:41 +01:00
|
|
|
type ResourceMonitorClient interface {
|
2019-04-12 20:27:18 +02:00
|
|
|
SupportsFeature(ctx context.Context, in *SupportsFeatureRequest, opts ...grpc.CallOption) (*SupportsFeatureResponse, error)
|
2017-11-17 03:21:41 +01:00
|
|
|
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
|
2019-10-22 08:02:32 +02:00
|
|
|
StreamInvoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (ResourceMonitor_StreamInvokeClient, error)
|
2018-04-05 18:48:09 +02:00
|
|
|
ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error)
|
2017-11-29 20:27:32 +01:00
|
|
|
RegisterResource(ctx context.Context, in *RegisterResourceRequest, opts ...grpc.CallOption) (*RegisterResourceResponse, error)
|
2018-07-12 03:07:50 +02:00
|
|
|
RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type resourceMonitorClient struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
cc grpc.ClientConnInterface
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
func NewResourceMonitorClient(cc grpc.ClientConnInterface) ResourceMonitorClient {
|
2017-11-17 03:21:41 +01:00
|
|
|
return &resourceMonitorClient{cc}
|
|
|
|
}
|
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
func (c *resourceMonitorClient) SupportsFeature(ctx context.Context, in *SupportsFeatureRequest, opts ...grpc.CallOption) (*SupportsFeatureResponse, error) {
|
|
|
|
out := new(SupportsFeatureResponse)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/SupportsFeature", in, out, opts...)
|
2019-04-12 20:27:18 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-11-17 03:21:41 +01:00
|
|
|
func (c *resourceMonitorClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
|
|
|
|
out := new(InvokeResponse)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/Invoke", in, out, opts...)
|
2017-11-17 03:21:41 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-10-22 08:02:32 +02:00
|
|
|
func (c *resourceMonitorClient) StreamInvoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (ResourceMonitor_StreamInvokeClient, error) {
|
2020-02-28 12:53:47 +01:00
|
|
|
stream, err := c.cc.NewStream(ctx, &_ResourceMonitor_serviceDesc.Streams[0], "/pulumirpc.ResourceMonitor/StreamInvoke", opts...)
|
2019-10-22 08:02:32 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
x := &resourceMonitorStreamInvokeClient{stream}
|
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return x, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ResourceMonitor_StreamInvokeClient interface {
|
|
|
|
Recv() (*InvokeResponse, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type resourceMonitorStreamInvokeClient struct {
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *resourceMonitorStreamInvokeClient) Recv() (*InvokeResponse, error) {
|
|
|
|
m := new(InvokeResponse)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
2018-04-05 18:48:09 +02:00
|
|
|
func (c *resourceMonitorClient) ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error) {
|
|
|
|
out := new(ReadResourceResponse)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/ReadResource", in, out, opts...)
|
2018-04-05 18:48:09 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func (c *resourceMonitorClient) RegisterResource(ctx context.Context, in *RegisterResourceRequest, opts ...grpc.CallOption) (*RegisterResourceResponse, error) {
|
|
|
|
out := new(RegisterResourceResponse)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResource", in, out, opts...)
|
2017-11-21 02:38:09 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (c *resourceMonitorClient) RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
out := new(empty.Empty)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResourceOutputs", in, out, opts...)
|
2017-11-17 03:21:41 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
// ResourceMonitorServer is the server API for ResourceMonitor service.
|
2017-11-17 03:21:41 +01:00
|
|
|
type ResourceMonitorServer interface {
|
2019-04-12 20:27:18 +02:00
|
|
|
SupportsFeature(context.Context, *SupportsFeatureRequest) (*SupportsFeatureResponse, error)
|
2017-11-17 03:21:41 +01:00
|
|
|
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
|
2019-10-22 08:02:32 +02:00
|
|
|
StreamInvoke(*InvokeRequest, ResourceMonitor_StreamInvokeServer) error
|
2018-04-05 18:48:09 +02:00
|
|
|
ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
|
2017-11-29 20:27:32 +01:00
|
|
|
RegisterResource(context.Context, *RegisterResourceRequest) (*RegisterResourceResponse, error)
|
2018-07-12 03:07:50 +02:00
|
|
|
RegisterResourceOutputs(context.Context, *RegisterResourceOutputsRequest) (*empty.Empty, error)
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
// UnimplementedResourceMonitorServer can be embedded to have forward compatible implementations.
|
|
|
|
type UnimplementedResourceMonitorServer struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnimplementedResourceMonitorServer) SupportsFeature(ctx context.Context, req *SupportsFeatureRequest) (*SupportsFeatureResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SupportsFeature not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedResourceMonitorServer) Invoke(ctx context.Context, req *InvokeRequest) (*InvokeResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedResourceMonitorServer) StreamInvoke(req *InvokeRequest, srv ResourceMonitor_StreamInvokeServer) error {
|
|
|
|
return status.Errorf(codes.Unimplemented, "method StreamInvoke not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedResourceMonitorServer) ReadResource(ctx context.Context, req *ReadResourceRequest) (*ReadResourceResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ReadResource not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedResourceMonitorServer) RegisterResource(ctx context.Context, req *RegisterResourceRequest) (*RegisterResourceResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterResource not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedResourceMonitorServer) RegisterResourceOutputs(ctx context.Context, req *RegisterResourceOutputsRequest) (*empty.Empty, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterResourceOutputs not implemented")
|
|
|
|
}
|
|
|
|
|
2017-11-17 03:21:41 +01:00
|
|
|
func RegisterResourceMonitorServer(s *grpc.Server, srv ResourceMonitorServer) {
|
|
|
|
s.RegisterService(&_ResourceMonitor_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
2019-04-12 20:27:18 +02:00
|
|
|
func _ResourceMonitor_SupportsFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(SupportsFeatureRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceMonitorServer).SupportsFeature(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceMonitor/SupportsFeature",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceMonitorServer).SupportsFeature(ctx, req.(*SupportsFeatureRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-11-17 03:21:41 +01:00
|
|
|
func _ResourceMonitor_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(InvokeRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceMonitorServer).Invoke(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceMonitor/Invoke",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceMonitorServer).Invoke(ctx, req.(*InvokeRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2019-10-22 08:02:32 +02:00
|
|
|
func _ResourceMonitor_StreamInvoke_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
m := new(InvokeRequest)
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return srv.(ResourceMonitorServer).StreamInvoke(m, &resourceMonitorStreamInvokeServer{stream})
|
|
|
|
}
|
|
|
|
|
|
|
|
type ResourceMonitor_StreamInvokeServer interface {
|
|
|
|
Send(*InvokeResponse) error
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type resourceMonitorStreamInvokeServer struct {
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *resourceMonitorStreamInvokeServer) Send(m *InvokeResponse) error {
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
2018-04-05 18:48:09 +02:00
|
|
|
func _ResourceMonitor_ReadResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ReadResourceRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceMonitorServer).ReadResource(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceMonitor/ReadResource",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceMonitorServer).ReadResource(ctx, req.(*ReadResourceRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func _ResourceMonitor_RegisterResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(RegisterResourceRequest)
|
2017-11-17 03:21:41 +01:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return srv.(ResourceMonitorServer).RegisterResource(ctx, in)
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-11-29 20:27:32 +01:00
|
|
|
FullMethod: "/pulumirpc.ResourceMonitor/RegisterResource",
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2017-11-29 20:27:32 +01:00
|
|
|
return srv.(ResourceMonitorServer).RegisterResource(ctx, req.(*RegisterResourceRequest))
|
2017-11-21 02:38:09 +01:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:27:32 +01:00
|
|
|
func _ResourceMonitor_RegisterResourceOutputs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(RegisterResourceOutputsRequest)
|
2017-11-21 02:38:09 +01:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2017-11-29 20:27:32 +01:00
|
|
|
return srv.(ResourceMonitorServer).RegisterResourceOutputs(ctx, in)
|
2017-11-21 02:38:09 +01:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-11-29 20:27:32 +01:00
|
|
|
FullMethod: "/pulumirpc.ResourceMonitor/RegisterResourceOutputs",
|
2017-11-21 02:38:09 +01:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2017-11-29 20:27:32 +01:00
|
|
|
return srv.(ResourceMonitorServer).RegisterResourceOutputs(ctx, req.(*RegisterResourceOutputsRequest))
|
2017-11-17 03:21:41 +01:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ResourceMonitor_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "pulumirpc.ResourceMonitor",
|
|
|
|
HandlerType: (*ResourceMonitorServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
2019-04-12 20:27:18 +02:00
|
|
|
{
|
|
|
|
MethodName: "SupportsFeature",
|
|
|
|
Handler: _ResourceMonitor_SupportsFeature_Handler,
|
|
|
|
},
|
2017-11-17 03:21:41 +01:00
|
|
|
{
|
|
|
|
MethodName: "Invoke",
|
|
|
|
Handler: _ResourceMonitor_Invoke_Handler,
|
|
|
|
},
|
2018-04-05 18:48:09 +02:00
|
|
|
{
|
|
|
|
MethodName: "ReadResource",
|
|
|
|
Handler: _ResourceMonitor_ReadResource_Handler,
|
|
|
|
},
|
2017-11-17 03:21:41 +01:00
|
|
|
{
|
2017-11-29 20:27:32 +01:00
|
|
|
MethodName: "RegisterResource",
|
|
|
|
Handler: _ResourceMonitor_RegisterResource_Handler,
|
2017-11-21 02:38:09 +01:00
|
|
|
},
|
|
|
|
{
|
2017-11-29 20:27:32 +01:00
|
|
|
MethodName: "RegisterResourceOutputs",
|
|
|
|
Handler: _ResourceMonitor_RegisterResourceOutputs_Handler,
|
2017-11-17 03:21:41 +01:00
|
|
|
},
|
|
|
|
},
|
2019-10-22 08:02:32 +02:00
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
{
|
|
|
|
StreamName: "StreamInvoke",
|
|
|
|
Handler: _ResourceMonitor_StreamInvoke_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
},
|
|
|
|
},
|
2017-11-17 03:21:41 +01:00
|
|
|
Metadata: "resource.proto",
|
|
|
|
}
|