proto

package
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_IPConfig_NicIndex = int32(0)
)

Default values for IPConfig fields.

Variables

View Source
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.

View Source
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.

View Source
var File_github_com_cloudprober_cloudprober_rds_proto_rds_proto protoreflect.FileDescriptor
View Source
var ResourceDiscovery_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cloudprober.rds.ResourceDiscovery",
	HandlerType: (*ResourceDiscoveryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListResources",
			Handler:    _ResourceDiscovery_ListResources_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/cloudprober/cloudprober/rds/proto/rds.proto",
}

ResourceDiscovery_ServiceDesc is the grpc.ServiceDesc for ResourceDiscovery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterResourceDiscoveryServer

func RegisterResourceDiscoveryServer(s grpc.ServiceRegistrar, 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) Descriptor() ([]byte, []int)

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetKey

func (x *Filter) GetKey() string

func (*Filter) GetValue

func (x *Filter) GetValue() string

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect added in v0.11.4

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use IPConfig.ProtoReflect.Descriptor instead.

func (*IPConfig) GetIpType

func (x *IPConfig) GetIpType() IPConfig_IPType

func (*IPConfig) GetIpVersion added in v0.11.4

func (x *IPConfig) GetIpVersion() IPConfig_IPVersion

func (*IPConfig) GetNicIndex

func (x *IPConfig) GetNicIndex() int32

func (*IPConfig) ProtoMessage

func (*IPConfig) ProtoMessage()

func (*IPConfig) ProtoReflect added in v0.11.4

func (x *IPConfig) ProtoReflect() protoreflect.Message

func (*IPConfig) Reset

func (x *IPConfig) Reset()

func (*IPConfig) String

func (x *IPConfig) String() string

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.11.4

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.11.4

func (IPConfig_IPType) String

func (x IPConfig_IPType) String() string

func (IPConfig_IPType) Type added in v0.11.4

func (*IPConfig_IPType) UnmarshalJSON deprecated

func (x *IPConfig_IPType) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type IPConfig_IPVersion added in v0.11.4

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.4

func (IPConfig_IPVersion) Enum added in v0.11.4

func (IPConfig_IPVersion) EnumDescriptor deprecated added in v0.11.4

func (IPConfig_IPVersion) EnumDescriptor() ([]byte, []int)

Deprecated: Use IPConfig_IPVersion.Descriptor instead.

func (IPConfig_IPVersion) Number added in v0.11.4

func (IPConfig_IPVersion) String added in v0.11.4

func (x IPConfig_IPVersion) String() string

func (IPConfig_IPVersion) Type added in v0.11.4

func (*IPConfig_IPVersion) UnmarshalJSON deprecated added in v0.11.4

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.4

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.11.4

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.4

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.11.4

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) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetId

func (x *Resource) GetId() string

func (*Resource) GetInfo

func (x *Resource) GetInfo() []byte

func (*Resource) GetIp

func (x *Resource) GetIp() string

func (*Resource) GetLabels

func (x *Resource) GetLabels() map[string]string

func (*Resource) GetLastUpdated added in v0.11.4

func (x *Resource) GetLastUpdated() int64

func (*Resource) GetName

func (x *Resource) GetName() string

func (*Resource) GetPort

func (x *Resource) GetPort() int32

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect added in v0.11.4

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ResourceDiscoveryServer

type ResourceDiscoveryServer interface {
	// ListResources returns the list of resources matching the URI provided in
	// the request.
	ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
	// contains filtered or unexported methods
}

ResourceDiscoveryServer is the server API for ResourceDiscovery service. All implementations must embed UnimplementedResourceDiscoveryServer for forward compatibility

type UnimplementedResourceDiscoveryServer

type UnimplementedResourceDiscoveryServer struct {
}

UnimplementedResourceDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedResourceDiscoveryServer) ListResources

type UnsafeResourceDiscoveryServer added in v0.11.4

type UnsafeResourceDiscoveryServer interface {
	// contains filtered or unexported methods
}

UnsafeResourceDiscoveryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceDiscoveryServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL