Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMeteringServer(s grpc.ServiceRegistrar, srv MeteringServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetApiKeyId() string
- func (x *Event) GetEndpoint() string
- func (x *Event) GetIpAddress() string
- func (x *Event) GetMeta() string
- func (x *Event) GetMetrics() []*Metric
- func (x *Event) GetNetwork() string
- func (x *Event) GetOutputModuleHash() string
- func (x *Event) GetProvider() string
- func (x *Event) GetTimestamp() *timestamppb.Timestamp
- func (x *Event) GetUserId() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type Events
- type MeteringClient
- type MeteringServer
- type Metric
- type UnimplementedMeteringServer
- type UnsafeMeteringServer
Constants ¶
const (
Metering_Emit_FullMethodName = "/sf.metering.v1.Metering/Emit"
)
Variables ¶
var File_sf_metering_v1_metering_proto protoreflect.FileDescriptor
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) GetApiKeyId ¶
func (*Event) GetEndpoint ¶
func (*Event) GetIpAddress ¶
func (*Event) GetMetrics ¶
func (*Event) GetNetwork ¶
func (*Event) GetOutputModuleHash ¶
func (*Event) GetProvider ¶
func (*Event) GetTimestamp ¶
func (x *Event) GetTimestamp() *timestamppb.Timestamp
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Events) ProtoMessage()
func (*Events) ProtoReflect ¶
func (x *Events) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶
func (x *Metric) ProtoReflect() protoreflect.Message
type UnimplementedMeteringServer ¶
type UnimplementedMeteringServer struct { }
UnimplementedMeteringServer must be embedded to have forward compatible implementations.
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.