resourcepb

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_resource_resourcepb_resource_proto protoreflect.FileDescriptor
View Source
var Resource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "resource.Resource",
	HandlerType: (*ResourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ResourceGet",
			Handler:    _Resource_ResourceGet_Handler,
		},
		{
			MethodName: "ResourceRequest",
			Handler:    _Resource_ResourceRequest_Handler,
		},
		{
			MethodName: "ResourceRelease",
			Handler:    _Resource_ResourceRelease_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "resource/resourcepb/resource.proto",
}

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

Functions

func RegisterResourceServer

func RegisterResourceServer(s grpc.ServiceRegistrar, srv ResourceServer)

Types

type Decimal64

type Decimal64 struct {
	Digits    int64  `protobuf:"varint,1,opt,name=digits,proto3" json:"digits,omitempty"`       // Set of digits.
	Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` // Number of digits following the decimal point.
	// contains filtered or unexported fields
}

Decimal64 is used to encode a fixed precision decimal number. The value is expressed as a set of digits with the precision specifying the number of digits following the decimal point in the digit set.

func (*Decimal64) Descriptor deprecated

func (*Decimal64) Descriptor() ([]byte, []int)

Deprecated: Use Decimal64.ProtoReflect.Descriptor instead.

func (*Decimal64) GetDigits

func (x *Decimal64) GetDigits() int64

func (*Decimal64) GetPrecision

func (x *Decimal64) GetPrecision() uint32

func (*Decimal64) ProtoMessage

func (*Decimal64) ProtoMessage()

func (*Decimal64) ProtoReflect

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

func (*Decimal64) Reset

func (x *Decimal64) Reset()

func (*Decimal64) String

func (x *Decimal64) String() string

type Reply

type Reply struct {
	Ready      bool                   `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
	Timestamp  int64                  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`   // Timestamp in nanoseconds since Epoch.
	ExpiryTime int64                  `protobuf:"varint,3,opt,name=expiryTime,proto3" json:"expiryTime,omitempty"` // ExpiryTime in nanoseconds since Epoch.
	Data       map[string]*TypedValue ``                                                                           // Map of tags (attribute) name to value.
	/* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Reply) Descriptor deprecated

func (*Reply) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetData

func (x *Reply) GetData() map[string]*TypedValue

func (*Reply) GetExpiryTime

func (x *Reply) GetExpiryTime() int64

func (*Reply) GetReady added in v0.0.8

func (x *Reply) GetReady() bool

func (*Reply) GetTimestamp

func (x *Reply) GetTimestamp() int64

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

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

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type Req added in v0.0.12

type Req struct {

	//string addressFamily = 1; // ipv4, ipv6
	IpPrefix string            `protobuf:"bytes,1,opt,name=ipPrefix,proto3" json:"ipPrefix,omitempty"`
	Selector map[string]string `` // Map of tags (attribute) name to value.
	/* 157-byte string literal not displayed */
	SourceTag map[string]string `` // Map of tags (attribute) name to value.
	/* 159-byte string literal not displayed */
	Data map[string]*TypedValue `` // Map of tags (attribute) name to value.
	/* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Req) Descriptor deprecated added in v0.0.12

func (*Req) Descriptor() ([]byte, []int)

Deprecated: Use Req.ProtoReflect.Descriptor instead.

func (*Req) GetData added in v0.0.12

func (x *Req) GetData() map[string]*TypedValue

func (*Req) GetIpPrefix added in v0.0.12

func (x *Req) GetIpPrefix() string

func (*Req) GetSelector added in v0.0.12

func (x *Req) GetSelector() map[string]string

func (*Req) GetSourceTag added in v0.0.12

func (x *Req) GetSourceTag() map[string]string

func (*Req) ProtoMessage added in v0.0.12

func (*Req) ProtoMessage()

func (*Req) ProtoReflect added in v0.0.12

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

func (*Req) Reset added in v0.0.12

func (x *Req) Reset()

func (*Req) String added in v0.0.12

func (x *Req) String() string

type Request

type Request struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	//map<string, string> oda  = 2;  // flexible org/depl/az.
	//string registryName = 3;
	//string networkInstanceName = 4; // only used in ipam for now
	RegisterName string `protobuf:"bytes,2,opt,name=registerName,proto3" json:"registerName,omitempty"`
	Kind         string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` // ipam, route-target, vlan
	Request      *Req   `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetKind

func (x *Request) GetKind() string

func (*Request) GetNamespace added in v0.0.10

func (x *Request) GetNamespace() string

func (*Request) GetRegisterName added in v0.0.17

func (x *Request) GetRegisterName() string

func (*Request) GetRequest added in v0.0.12

func (x *Request) GetRequest() *Req

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type ResourceClient

type ResourceClient interface {
	ResourceGet(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
	ResourceRequest(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
	ResourceRelease(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
}

ResourceClient is the client API for Resource 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.

func NewResourceClient

func NewResourceClient(cc grpc.ClientConnInterface) ResourceClient

type ResourceServer

type ResourceServer interface {
	ResourceGet(context.Context, *Request) (*Reply, error)
	ResourceRequest(context.Context, *Request) (*Reply, error)
	ResourceRelease(context.Context, *Request) (*Reply, error)
	// contains filtered or unexported methods
}

ResourceServer is the server API for Resource service. All implementations must embed UnimplementedResourceServer for forward compatibility

type ScalarArray

type ScalarArray struct {

	// The set of elements within the array. Each TypedValue message should
	// specify only elements that have a field identifier of 1-7 (i.e., the
	// values are scalar values).
	Element []*TypedValue `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

ScalarArray is used to encode a mixed-type array of values.

func (*ScalarArray) Descriptor deprecated

func (*ScalarArray) Descriptor() ([]byte, []int)

Deprecated: Use ScalarArray.ProtoReflect.Descriptor instead.

func (*ScalarArray) GetElement

func (x *ScalarArray) GetElement() []*TypedValue

func (*ScalarArray) ProtoMessage

func (*ScalarArray) ProtoMessage()

func (*ScalarArray) ProtoReflect

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

func (*ScalarArray) Reset

func (x *ScalarArray) Reset()

func (*ScalarArray) String

func (x *ScalarArray) String() string

type TypedValue

type TypedValue struct {

	// One of the fields within the val oneof is populated with the value
	// of the update. The type of the value being included in the Update
	// determines which field should be populated. In the case that the
	// encoding is a particular form of the base protobuf type, a specific
	// field is used to store the value (e.g., json_val).
	//
	// Types that are assignable to Value:
	//	*TypedValue_StringVal
	//	*TypedValue_IntVal
	//	*TypedValue_UintVal
	//	*TypedValue_BoolVal
	//	*TypedValue_BytesVal
	//	*TypedValue_FloatVal
	//	*TypedValue_DecimalVal
	//	*TypedValue_LeaflistVal
	//	*TypedValue_AnyVal
	//	*TypedValue_JsonVal
	//	*TypedValue_JsonIetfVal
	//	*TypedValue_AsciiVal
	//	*TypedValue_ProtoBytes
	Value isTypedValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

TypedValue is used to encode a value being sent between the client and target (originated by either entity).

func (*TypedValue) Descriptor deprecated

func (*TypedValue) Descriptor() ([]byte, []int)

Deprecated: Use TypedValue.ProtoReflect.Descriptor instead.

func (*TypedValue) GetAnyVal

func (x *TypedValue) GetAnyVal() *anypb.Any

func (*TypedValue) GetAsciiVal

func (x *TypedValue) GetAsciiVal() string

func (*TypedValue) GetBoolVal

func (x *TypedValue) GetBoolVal() bool

func (*TypedValue) GetBytesVal

func (x *TypedValue) GetBytesVal() []byte

func (*TypedValue) GetDecimalVal

func (x *TypedValue) GetDecimalVal() *Decimal64

func (*TypedValue) GetFloatVal

func (x *TypedValue) GetFloatVal() float32

func (*TypedValue) GetIntVal

func (x *TypedValue) GetIntVal() int64

func (*TypedValue) GetJsonIetfVal

func (x *TypedValue) GetJsonIetfVal() []byte

func (*TypedValue) GetJsonVal

func (x *TypedValue) GetJsonVal() []byte

func (*TypedValue) GetLeaflistVal

func (x *TypedValue) GetLeaflistVal() *ScalarArray

func (*TypedValue) GetProtoBytes

func (x *TypedValue) GetProtoBytes() []byte

func (*TypedValue) GetStringVal

func (x *TypedValue) GetStringVal() string

func (*TypedValue) GetUintVal

func (x *TypedValue) GetUintVal() uint64

func (*TypedValue) GetValue

func (m *TypedValue) GetValue() isTypedValue_Value

func (*TypedValue) ProtoMessage

func (*TypedValue) ProtoMessage()

func (*TypedValue) ProtoReflect

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

func (*TypedValue) Reset

func (x *TypedValue) Reset()

func (*TypedValue) String

func (x *TypedValue) String() string

type TypedValue_AnyVal

type TypedValue_AnyVal struct {
	AnyVal *anypb.Any `protobuf:"bytes,9,opt,name=any_val,json=anyVal,proto3,oneof"` // protobuf.Any encoded bytes.
}

type TypedValue_AsciiVal

type TypedValue_AsciiVal struct {
	AsciiVal string `protobuf:"bytes,12,opt,name=ascii_val,json=asciiVal,proto3,oneof"` // Arbitrary ASCII text.
}

type TypedValue_BoolVal

type TypedValue_BoolVal struct {
	BoolVal bool `protobuf:"varint,4,opt,name=bool_val,json=boolVal,proto3,oneof"` // Bool value.
}

type TypedValue_BytesVal

type TypedValue_BytesVal struct {
	BytesVal []byte `protobuf:"bytes,5,opt,name=bytes_val,json=bytesVal,proto3,oneof"` // Arbitrary byte sequence value.
}

type TypedValue_DecimalVal

type TypedValue_DecimalVal struct {
	DecimalVal *Decimal64 `protobuf:"bytes,7,opt,name=decimal_val,json=decimalVal,proto3,oneof"` // Decimal64 encoded value.
}

type TypedValue_FloatVal

type TypedValue_FloatVal struct {
	FloatVal float32 `protobuf:"fixed32,6,opt,name=float_val,json=floatVal,proto3,oneof"` // Floating point value.
}

type TypedValue_IntVal

type TypedValue_IntVal struct {
	IntVal int64 `protobuf:"varint,2,opt,name=int_val,json=intVal,proto3,oneof"` // Integer value.
}

type TypedValue_JsonIetfVal

type TypedValue_JsonIetfVal struct {
	JsonIetfVal []byte `protobuf:"bytes,11,opt,name=json_ietf_val,json=jsonIetfVal,proto3,oneof"` // JSON-encoded text per RFC7951.
}

type TypedValue_JsonVal

type TypedValue_JsonVal struct {
	JsonVal []byte `protobuf:"bytes,10,opt,name=json_val,json=jsonVal,proto3,oneof"` // JSON-encoded text.
}

type TypedValue_LeaflistVal

type TypedValue_LeaflistVal struct {
	LeaflistVal *ScalarArray `protobuf:"bytes,8,opt,name=leaflist_val,json=leaflistVal,proto3,oneof"` // Mixed type scalar array value.
}

type TypedValue_ProtoBytes

type TypedValue_ProtoBytes struct {
	// Protobuf binary encoded bytes. The message type is not included.
	// See the specification at
	// github.com/openconfig/reference/blob/master/rpc/gnmi/protobuf-vals.md
	// for a complete specification.
	ProtoBytes []byte `protobuf:"bytes,13,opt,name=proto_bytes,json=protoBytes,proto3,oneof"`
}

type TypedValue_StringVal

type TypedValue_StringVal struct {
	StringVal string `protobuf:"bytes,1,opt,name=string_val,json=stringVal,proto3,oneof"` // String value.
}

type TypedValue_UintVal

type TypedValue_UintVal struct {
	UintVal uint64 `protobuf:"varint,3,opt,name=uint_val,json=uintVal,proto3,oneof"` // Unsigned integer value.
}

type UnimplementedResourceServer

type UnimplementedResourceServer struct {
}

UnimplementedResourceServer must be embedded to have forward compatible implementations.

func (UnimplementedResourceServer) ResourceGet added in v0.0.4

func (UnimplementedResourceServer) ResourceRelease added in v0.0.12

func (UnimplementedResourceServer) ResourceRequest added in v0.0.12

type UnsafeResourceServer

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

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

Jump to

Keyboard shortcuts

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