Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterResourceDiscoveryServer(s *grpc.Server, srv ResourceDiscoveryServer)
- type Filter
- type IPConfig
- func (*IPConfig) Descriptor() ([]byte, []int)deprecated
- func (x *IPConfig) GetIpType() IPConfig_IPType
- func (x *IPConfig) GetIpVersion() IPConfig_IPVersion
- func (x *IPConfig) GetNicIndex() int32
- func (*IPConfig) ProtoMessage()
- func (x *IPConfig) ProtoReflect() protoreflect.Message
- func (x *IPConfig) Reset()
- func (x *IPConfig) String() string
- type IPConfig_IPType
- func (IPConfig_IPType) Descriptor() protoreflect.EnumDescriptor
- func (x IPConfig_IPType) Enum() *IPConfig_IPType
- func (IPConfig_IPType) EnumDescriptor() ([]byte, []int)deprecated
- func (x IPConfig_IPType) Number() protoreflect.EnumNumber
- func (x IPConfig_IPType) String() string
- func (IPConfig_IPType) Type() protoreflect.EnumType
- func (x *IPConfig_IPType) UnmarshalJSON(b []byte) errordeprecated
- type IPConfig_IPVersion
- func (IPConfig_IPVersion) Descriptor() protoreflect.EnumDescriptor
- func (x IPConfig_IPVersion) Enum() *IPConfig_IPVersion
- func (IPConfig_IPVersion) EnumDescriptor() ([]byte, []int)deprecated
- func (x IPConfig_IPVersion) Number() protoreflect.EnumNumber
- func (x IPConfig_IPVersion) String() string
- func (IPConfig_IPVersion) Type() protoreflect.EnumType
- func (x *IPConfig_IPVersion) UnmarshalJSON(b []byte) errordeprecated
- type ListResourcesRequest
- func (*ListResourcesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesRequest) GetFilter() []*Filter
- func (x *ListResourcesRequest) GetIfModifiedSince() int64
- func (x *ListResourcesRequest) GetIpConfig() *IPConfig
- func (x *ListResourcesRequest) GetProvider() string
- func (x *ListResourcesRequest) GetResourcePath() string
- func (*ListResourcesRequest) ProtoMessage()
- func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
- func (x *ListResourcesRequest) Reset()
- func (x *ListResourcesRequest) String() string
- type ListResourcesResponse
- func (*ListResourcesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesResponse) GetLastModified() int64
- func (x *ListResourcesResponse) GetResources() []*Resource
- func (*ListResourcesResponse) ProtoMessage()
- func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
- func (x *ListResourcesResponse) Reset()
- func (x *ListResourcesResponse) String() string
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)deprecated
- func (x *Resource) GetId() string
- func (x *Resource) GetInfo() []byte
- func (x *Resource) GetIp() string
- func (x *Resource) GetLabels() map[string]string
- func (x *Resource) GetLastUpdated() int64
- func (x *Resource) GetName() string
- func (x *Resource) GetPort() int32
- func (*Resource) ProtoMessage()
- func (x *Resource) ProtoReflect() protoreflect.Message
- func (x *Resource) Reset()
- func (x *Resource) String() string
- type ResourceDiscoveryClient
- type ResourceDiscoveryServer
- type UnimplementedResourceDiscoveryServer
Constants ¶
const (
Default_IPConfig_NicIndex = int32(0)
)
Default values for IPConfig fields.
Variables ¶
var ( IPConfig_IPType_name = map[int32]string{ 0: "DEFAULT", 1: "PUBLIC", 2: "ALIAS", } IPConfig_IPType_value = map[string]int32{ "DEFAULT": 0, "PUBLIC": 1, "ALIAS": 2, } )
Enum value maps for IPConfig_IPType.
var ( IPConfig_IPVersion_name = map[int32]string{ 0: "IP_VERSION_UNSPECIFIED", 1: "IPV4", 2: "IPV6", } IPConfig_IPVersion_value = map[string]int32{ "IP_VERSION_UNSPECIFIED": 0, "IPV4": 1, "IPV6": 2, } )
Enum value maps for IPConfig_IPVersion.
var File_github_com_google_cloudprober_rds_proto_rds_proto protoreflect.FileDescriptor
Functions ¶
func RegisterResourceDiscoveryServer ¶
func RegisterResourceDiscoveryServer(s *grpc.Server, srv ResourceDiscoveryServer)
Types ¶
type Filter ¶
type Filter struct { Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Filter) Descriptor
deprecated
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) ProtoReflect ¶ added in v0.10.8
func (x *Filter) ProtoReflect() protoreflect.Message
type IPConfig ¶
type IPConfig struct { // NIC index NicIndex *int32 `protobuf:"varint,1,opt,name=nic_index,json=nicIndex,def=0" json:"nic_index,omitempty"` IpType *IPConfig_IPType `protobuf:"varint,3,opt,name=ip_type,json=ipType,enum=cloudprober.rds.IPConfig_IPType" json:"ip_type,omitempty"` IpVersion *IPConfig_IPVersion `protobuf:"varint,2,opt,name=ip_version,json=ipVersion,enum=cloudprober.rds.IPConfig_IPVersion" json:"ip_version,omitempty"` // contains filtered or unexported fields }
func (*IPConfig) Descriptor
deprecated
func (*IPConfig) GetIpType ¶
func (x *IPConfig) GetIpType() IPConfig_IPType
func (*IPConfig) GetIpVersion ¶ added in v0.11.2
func (x *IPConfig) GetIpVersion() IPConfig_IPVersion
func (*IPConfig) GetNicIndex ¶
func (*IPConfig) ProtoMessage ¶
func (*IPConfig) ProtoMessage()
func (*IPConfig) ProtoReflect ¶ added in v0.10.8
func (x *IPConfig) ProtoReflect() protoreflect.Message
type IPConfig_IPType ¶
type IPConfig_IPType int32
const ( // Default IP of the resource. // - Private IP for instance resource // - Forwarding rule IP for forwarding rule. IPConfig_DEFAULT IPConfig_IPType = 0 // Instance's external IP. IPConfig_PUBLIC IPConfig_IPType = 1 // First IP address from the first Alias IP range. For example, for // alias IP range "192.168.12.0/24", 192.168.12.0 will be returned. // Supported only on GCE. IPConfig_ALIAS IPConfig_IPType = 2 )
func (IPConfig_IPType) Descriptor ¶ added in v0.10.8
func (IPConfig_IPType) Descriptor() protoreflect.EnumDescriptor
func (IPConfig_IPType) Enum ¶
func (x IPConfig_IPType) Enum() *IPConfig_IPType
func (IPConfig_IPType) EnumDescriptor
deprecated
func (IPConfig_IPType) EnumDescriptor() ([]byte, []int)
Deprecated: Use IPConfig_IPType.Descriptor instead.
func (IPConfig_IPType) Number ¶ added in v0.10.8
func (x IPConfig_IPType) Number() protoreflect.EnumNumber
func (IPConfig_IPType) String ¶
func (x IPConfig_IPType) String() string
func (IPConfig_IPType) Type ¶ added in v0.10.8
func (IPConfig_IPType) Type() protoreflect.EnumType
func (*IPConfig_IPType) UnmarshalJSON
deprecated
func (x *IPConfig_IPType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type IPConfig_IPVersion ¶ added in v0.11.2
type IPConfig_IPVersion int32
const ( IPConfig_IP_VERSION_UNSPECIFIED IPConfig_IPVersion = 0 IPConfig_IPV4 IPConfig_IPVersion = 1 IPConfig_IPV6 IPConfig_IPVersion = 2 )
func (IPConfig_IPVersion) Descriptor ¶ added in v0.11.2
func (IPConfig_IPVersion) Descriptor() protoreflect.EnumDescriptor
func (IPConfig_IPVersion) Enum ¶ added in v0.11.2
func (x IPConfig_IPVersion) Enum() *IPConfig_IPVersion
func (IPConfig_IPVersion) EnumDescriptor
deprecated
added in
v0.11.2
func (IPConfig_IPVersion) EnumDescriptor() ([]byte, []int)
Deprecated: Use IPConfig_IPVersion.Descriptor instead.
func (IPConfig_IPVersion) Number ¶ added in v0.11.2
func (x IPConfig_IPVersion) Number() protoreflect.EnumNumber
func (IPConfig_IPVersion) String ¶ added in v0.11.2
func (x IPConfig_IPVersion) String() string
func (IPConfig_IPVersion) Type ¶ added in v0.11.2
func (IPConfig_IPVersion) Type() protoreflect.EnumType
func (*IPConfig_IPVersion) UnmarshalJSON
deprecated
added in
v0.11.2
func (x *IPConfig_IPVersion) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type ListResourcesRequest ¶
type ListResourcesRequest struct { // Provider is the resource list provider, for example: "gcp", "aws", etc. Provider *string `protobuf:"bytes,1,req,name=provider" json:"provider,omitempty"` // Provider specific resource path. For example: for GCP, it could be // "gce_instances/<project>", "regional_forwarding_rules/<project>", etc. ResourcePath *string `protobuf:"bytes,2,opt,name=resource_path,json=resourcePath" json:"resource_path,omitempty"` // Filters for the resources list. Filters are ANDed: all filters should // succeed for an item to included in the result list. Filter []*Filter `protobuf:"bytes,3,rep,name=filter" json:"filter,omitempty"` // Optional. If resource has an IP (and a NIC) address, following // fields determine which IP address will be included in the results. IpConfig *IPConfig `protobuf:"bytes,4,opt,name=ip_config,json=ipConfig" json:"ip_config,omitempty"` // If specified, and if provider supports it, server will send resources in // the response only if they have changed since the given timestamp. Since // there may be no resources in the response for non-caching reasons as well, // clients should use the "last_modified" field in the response to determine // if they need to update the local cache or not. IfModifiedSince *int64 `protobuf:"varint,5,opt,name=if_modified_since,json=ifModifiedSince" json:"if_modified_since,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesRequest) Descriptor
deprecated
func (*ListResourcesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.
func (*ListResourcesRequest) GetFilter ¶
func (x *ListResourcesRequest) GetFilter() []*Filter
func (*ListResourcesRequest) GetIfModifiedSince ¶ added in v0.11.3
func (x *ListResourcesRequest) GetIfModifiedSince() int64
func (*ListResourcesRequest) GetIpConfig ¶
func (x *ListResourcesRequest) GetIpConfig() *IPConfig
func (*ListResourcesRequest) GetProvider ¶
func (x *ListResourcesRequest) GetProvider() string
func (*ListResourcesRequest) GetResourcePath ¶
func (x *ListResourcesRequest) GetResourcePath() string
func (*ListResourcesRequest) ProtoMessage ¶
func (*ListResourcesRequest) ProtoMessage()
func (*ListResourcesRequest) ProtoReflect ¶ added in v0.10.8
func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
func (*ListResourcesRequest) Reset ¶
func (x *ListResourcesRequest) Reset()
func (*ListResourcesRequest) String ¶
func (x *ListResourcesRequest) String() string
type ListResourcesResponse ¶
type ListResourcesResponse struct { // There may not be any resources in the response if request contains the // "if_modified_since" field and provider "knows" that nothing has changed since // the if_modified_since timestamp. Resources []*Resource `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"` // When were resources last modified. This field will always be set if // provider has a way of figuring out last_modified timestamp for its // resources. LastModified *int64 `protobuf:"varint,2,opt,name=last_modified,json=lastModified" json:"last_modified,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesResponse) Descriptor
deprecated
func (*ListResourcesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.
func (*ListResourcesResponse) GetLastModified ¶ added in v0.11.3
func (x *ListResourcesResponse) GetLastModified() int64
func (*ListResourcesResponse) GetResources ¶
func (x *ListResourcesResponse) GetResources() []*Resource
func (*ListResourcesResponse) ProtoMessage ¶
func (*ListResourcesResponse) ProtoMessage()
func (*ListResourcesResponse) ProtoReflect ¶ added in v0.10.8
func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
func (*ListResourcesResponse) Reset ¶
func (x *ListResourcesResponse) Reset()
func (*ListResourcesResponse) String ¶
func (x *ListResourcesResponse) String() string
type Resource ¶
type Resource struct { // Resource name. Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` // Resource's IP address, selected based on the request's ip_config. Ip *string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"` // Resource's port, if any. Port *int32 `protobuf:"varint,5,opt,name=port" json:"port,omitempty"` // Resource's labels, if any. Labels map[string]string `` /* 132-byte string literal not displayed */ // Last updated (in unix epoch). LastUpdated *int64 `protobuf:"varint,7,opt,name=last_updated,json=lastUpdated" json:"last_updated,omitempty"` // Id associated with the resource, if any. Id *string `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` // Optional info associated with the resource. Some resource type may make use // of it. Info []byte `protobuf:"bytes,4,opt,name=info" json:"info,omitempty"` // contains filtered or unexported fields }
func (*Resource) Descriptor
deprecated
func (*Resource) GetLastUpdated ¶ added in v0.11.1
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶ added in v0.10.8
func (x *Resource) ProtoReflect() protoreflect.Message
type ResourceDiscoveryClient ¶
type ResourceDiscoveryClient interface { // ListResources returns the list of resources matching the URI provided in // the request. ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) }
ResourceDiscoveryClient is the client API for ResourceDiscovery service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewResourceDiscoveryClient ¶
func NewResourceDiscoveryClient(cc grpc.ClientConnInterface) ResourceDiscoveryClient
type ResourceDiscoveryServer ¶
type ResourceDiscoveryServer interface { // ListResources returns the list of resources matching the URI provided in // the request. ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) }
ResourceDiscoveryServer is the server API for ResourceDiscovery service.
type UnimplementedResourceDiscoveryServer ¶
type UnimplementedResourceDiscoveryServer struct { }
UnimplementedResourceDiscoveryServer can be embedded to have forward compatible implementations.
func (*UnimplementedResourceDiscoveryServer) ListResources ¶
func (*UnimplementedResourceDiscoveryServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)