pbmetering

package
v0.0.0-...-489f5a9 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Metering_Emit_FullMethodName = "/sf.metering.v1.Metering/Emit"
)

Variables

View Source
var File_sf_metering_v1_metering_proto protoreflect.FileDescriptor
View Source
var Metering_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sf.metering.v1.Metering",
	HandlerType: (*MeteringServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Emit",
			Handler:    _Metering_Emit_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sf/metering/v1/metering.proto",
}

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

Functions

func RegisterMeteringServer

func RegisterMeteringServer(s grpc.ServiceRegistrar, srv MeteringServer)

Types

type Event

type Event struct {
	UserId    string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ApiKeyId  string `protobuf:"bytes,2,opt,name=api_key_id,json=apiKeyId,proto3" json:"api_key_id,omitempty"`
	IpAddress string `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	// Defines the endpoint that emitted the event (sf.firehose.v1/Blocks ...)
	Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Defines the blockchain (eth-mainnet, sol-mainnet ...)
	Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"`
	Meta    string `protobuf:"bytes,7,opt,name=meta,proto3" json:"meta,omitempty"`
	// Provider is a free-form string containing the identity data of the entity
	// that processed this event. Currently use to identify which indexer actually
	// produced the event for billing purposes.
	Provider         string                 `protobuf:"bytes,8,opt,name=provider,proto3" json:"provider,omitempty"`
	OutputModuleHash string                 `protobuf:"bytes,9,opt,name=output_module_hash,json=outputModuleHash,proto3" json:"output_module_hash,omitempty"`
	Metrics          []*Metric              `protobuf:"bytes,20,rep,name=metrics,proto3" json:"metrics,omitempty"`
	Timestamp        *timestamppb.Timestamp `protobuf:"bytes,30,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetApiKeyId

func (x *Event) GetApiKeyId() string

func (*Event) GetEndpoint

func (x *Event) GetEndpoint() string

func (*Event) GetIpAddress

func (x *Event) GetIpAddress() string

func (*Event) GetMeta

func (x *Event) GetMeta() string

func (*Event) GetMetrics

func (x *Event) GetMetrics() []*Metric

func (*Event) GetNetwork

func (x *Event) GetNetwork() string

func (*Event) GetOutputModuleHash

func (x *Event) GetOutputModuleHash() string

func (*Event) GetProvider

func (x *Event) GetProvider() string

func (*Event) GetTimestamp

func (x *Event) GetTimestamp() *timestamppb.Timestamp

func (*Event) GetUserId

func (x *Event) GetUserId() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Events

type Events struct {
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*Events) Descriptor deprecated

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

Deprecated: Use Events.ProtoReflect.Descriptor instead.

func (*Events) GetEvents

func (x *Events) GetEvents() []*Event

func (*Events) ProtoMessage

func (*Events) ProtoMessage()

func (*Events) ProtoReflect

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

func (*Events) Reset

func (x *Events) Reset()

func (*Events) String

func (x *Events) String() string

type MeteringClient

type MeteringClient interface {
	Emit(ctx context.Context, in *Events, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

MeteringClient is the client API for Metering 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 NewMeteringClient

func NewMeteringClient(cc grpc.ClientConnInterface) MeteringClient

type MeteringServer

type MeteringServer interface {
	Emit(context.Context, *Events) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

MeteringServer is the server API for Metering service. All implementations must embed UnimplementedMeteringServer for forward compatibility

type Metric

type Metric struct {
	Key   string  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Metric) Descriptor deprecated

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

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetKey

func (x *Metric) GetKey() string

func (*Metric) GetValue

func (x *Metric) GetValue() float64

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

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

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type UnimplementedMeteringServer

type UnimplementedMeteringServer struct {
}

UnimplementedMeteringServer must be embedded to have forward compatible implementations.

func (UnimplementedMeteringServer) Emit

type UnsafeMeteringServer

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

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

Jump to

Keyboard shortcuts

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