Documentation ¶
Overview ¶
Package spyv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSpyRPCServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSpyRPCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SpyRPCServiceClient) error
- func RegisterSpyRPCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSpyRPCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SpyRPCServiceServer) error
- func RegisterSpyRPCServiceServer(s grpc.ServiceRegistrar, srv SpyRPCServiceServer)
- type BatchFilter
- func (*BatchFilter) Descriptor() ([]byte, []int)deprecated
- func (x *BatchFilter) GetChainId() v1.ChainID
- func (x *BatchFilter) GetNonce() uint32
- func (x *BatchFilter) GetTxId() []byte
- func (*BatchFilter) ProtoMessage()
- func (x *BatchFilter) ProtoReflect() protoreflect.Message
- func (x *BatchFilter) Reset()
- func (x *BatchFilter) String() string
- type BatchTransactionFilter
- func (*BatchTransactionFilter) Descriptor() ([]byte, []int)deprecated
- func (x *BatchTransactionFilter) GetChainId() v1.ChainID
- func (x *BatchTransactionFilter) GetTxId() []byte
- func (*BatchTransactionFilter) ProtoMessage()
- func (x *BatchTransactionFilter) ProtoReflect() protoreflect.Message
- func (x *BatchTransactionFilter) Reset()
- func (x *BatchTransactionFilter) String() string
- type EmitterFilter
- func (*EmitterFilter) Descriptor() ([]byte, []int)deprecated
- func (x *EmitterFilter) GetChainId() v1.ChainID
- func (x *EmitterFilter) GetEmitterAddress() string
- func (*EmitterFilter) ProtoMessage()
- func (x *EmitterFilter) ProtoReflect() protoreflect.Message
- func (x *EmitterFilter) Reset()
- func (x *EmitterFilter) String() string
- type FilterEntry
- func (*FilterEntry) Descriptor() ([]byte, []int)deprecated
- func (x *FilterEntry) GetBatchFilter() *BatchFilter
- func (x *FilterEntry) GetBatchTransactionFilter() *BatchTransactionFilter
- func (x *FilterEntry) GetEmitterFilter() *EmitterFilter
- func (m *FilterEntry) GetFilter() isFilterEntry_Filter
- func (*FilterEntry) ProtoMessage()
- func (x *FilterEntry) ProtoReflect() protoreflect.Message
- func (x *FilterEntry) Reset()
- func (x *FilterEntry) String() string
- type FilterEntry_BatchFilter
- type FilterEntry_BatchTransactionFilter
- type FilterEntry_EmitterFilter
- type SpyRPCServiceClient
- type SpyRPCServiceServer
- type SpyRPCService_SubscribeSignedVAAClient
- type SpyRPCService_SubscribeSignedVAAServer
- type SubscribeSignedVAARequest
- func (*SubscribeSignedVAARequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeSignedVAARequest) GetFilters() []*FilterEntry
- func (*SubscribeSignedVAARequest) ProtoMessage()
- func (x *SubscribeSignedVAARequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeSignedVAARequest) Reset()
- func (x *SubscribeSignedVAARequest) String() string
- type SubscribeSignedVAAResponse
- func (*SubscribeSignedVAAResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeSignedVAAResponse) GetVaaBytes() []byte
- func (*SubscribeSignedVAAResponse) ProtoMessage()
- func (x *SubscribeSignedVAAResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeSignedVAAResponse) Reset()
- func (x *SubscribeSignedVAAResponse) String() string
- type UnimplementedSpyRPCServiceServer
- type UnsafeSpyRPCServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_spy_v1_spy_proto protoreflect.FileDescriptor
var SpyRPCService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "spy.v1.SpyRPCService", HandlerType: (*SpyRPCServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "SubscribeSignedVAA", Handler: _SpyRPCService_SubscribeSignedVAA_Handler, ServerStreams: true, }, }, Metadata: "spy/v1/spy.proto", }
SpyRPCService_ServiceDesc is the grpc.ServiceDesc for SpyRPCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSpyRPCServiceHandler ¶
func RegisterSpyRPCServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSpyRPCServiceHandler registers the http handlers for service SpyRPCService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSpyRPCServiceHandlerClient ¶
func RegisterSpyRPCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SpyRPCServiceClient) error
RegisterSpyRPCServiceHandlerClient registers the http handlers for service SpyRPCService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SpyRPCServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SpyRPCServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SpyRPCServiceClient" to call the correct interceptors.
func RegisterSpyRPCServiceHandlerFromEndpoint ¶
func RegisterSpyRPCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSpyRPCServiceHandlerFromEndpoint is same as RegisterSpyRPCServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSpyRPCServiceHandlerServer ¶
func RegisterSpyRPCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SpyRPCServiceServer) error
RegisterSpyRPCServiceHandlerServer registers the http handlers for service SpyRPCService to "mux". UnaryRPC :call SpyRPCServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSpyRPCServiceHandlerFromEndpoint instead.
func RegisterSpyRPCServiceServer ¶
func RegisterSpyRPCServiceServer(s grpc.ServiceRegistrar, srv SpyRPCServiceServer)
Types ¶
type BatchFilter ¶
type BatchFilter struct { // Source chain ChainId v1.ChainID `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3,enum=publicrpc.v1.ChainID" json:"chain_id,omitempty"` // Native transaction identifier bytes. TxId []byte `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // Nonce of the messages in the batch. Nonce uint32 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
func (*BatchFilter) Descriptor
deprecated
func (*BatchFilter) Descriptor() ([]byte, []int)
Deprecated: Use BatchFilter.ProtoReflect.Descriptor instead.
func (*BatchFilter) GetChainId ¶
func (x *BatchFilter) GetChainId() v1.ChainID
func (*BatchFilter) GetNonce ¶
func (x *BatchFilter) GetNonce() uint32
func (*BatchFilter) GetTxId ¶
func (x *BatchFilter) GetTxId() []byte
func (*BatchFilter) ProtoMessage ¶
func (*BatchFilter) ProtoMessage()
func (*BatchFilter) ProtoReflect ¶
func (x *BatchFilter) ProtoReflect() protoreflect.Message
func (*BatchFilter) Reset ¶
func (x *BatchFilter) Reset()
func (*BatchFilter) String ¶
func (x *BatchFilter) String() string
type BatchTransactionFilter ¶
type BatchTransactionFilter struct { // Source chain ChainId v1.ChainID `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3,enum=publicrpc.v1.ChainID" json:"chain_id,omitempty"` // Native transaction identifier bytes. TxId []byte `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // contains filtered or unexported fields }
func (*BatchTransactionFilter) Descriptor
deprecated
func (*BatchTransactionFilter) Descriptor() ([]byte, []int)
Deprecated: Use BatchTransactionFilter.ProtoReflect.Descriptor instead.
func (*BatchTransactionFilter) GetChainId ¶
func (x *BatchTransactionFilter) GetChainId() v1.ChainID
func (*BatchTransactionFilter) GetTxId ¶
func (x *BatchTransactionFilter) GetTxId() []byte
func (*BatchTransactionFilter) ProtoMessage ¶
func (*BatchTransactionFilter) ProtoMessage()
func (*BatchTransactionFilter) ProtoReflect ¶
func (x *BatchTransactionFilter) ProtoReflect() protoreflect.Message
func (*BatchTransactionFilter) Reset ¶
func (x *BatchTransactionFilter) Reset()
func (*BatchTransactionFilter) String ¶
func (x *BatchTransactionFilter) String() string
type EmitterFilter ¶
type EmitterFilter struct { // Source chain ChainId v1.ChainID `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3,enum=publicrpc.v1.ChainID" json:"chain_id,omitempty"` // Hex-encoded (without leading 0x) emitter address. EmitterAddress string `protobuf:"bytes,2,opt,name=emitter_address,json=emitterAddress,proto3" json:"emitter_address,omitempty"` // contains filtered or unexported fields }
A MessageFilter represents an exact match for an emitter.
func (*EmitterFilter) Descriptor
deprecated
func (*EmitterFilter) Descriptor() ([]byte, []int)
Deprecated: Use EmitterFilter.ProtoReflect.Descriptor instead.
func (*EmitterFilter) GetChainId ¶
func (x *EmitterFilter) GetChainId() v1.ChainID
func (*EmitterFilter) GetEmitterAddress ¶
func (x *EmitterFilter) GetEmitterAddress() string
func (*EmitterFilter) ProtoMessage ¶
func (*EmitterFilter) ProtoMessage()
func (*EmitterFilter) ProtoReflect ¶
func (x *EmitterFilter) ProtoReflect() protoreflect.Message
func (*EmitterFilter) Reset ¶
func (x *EmitterFilter) Reset()
func (*EmitterFilter) String ¶
func (x *EmitterFilter) String() string
type FilterEntry ¶
type FilterEntry struct { // Types that are assignable to Filter: // // *FilterEntry_EmitterFilter // *FilterEntry_BatchFilter // *FilterEntry_BatchTransactionFilter Filter isFilterEntry_Filter `protobuf_oneof:"filter"` // contains filtered or unexported fields }
func (*FilterEntry) Descriptor
deprecated
func (*FilterEntry) Descriptor() ([]byte, []int)
Deprecated: Use FilterEntry.ProtoReflect.Descriptor instead.
func (*FilterEntry) GetBatchFilter ¶
func (x *FilterEntry) GetBatchFilter() *BatchFilter
func (*FilterEntry) GetBatchTransactionFilter ¶
func (x *FilterEntry) GetBatchTransactionFilter() *BatchTransactionFilter
func (*FilterEntry) GetEmitterFilter ¶
func (x *FilterEntry) GetEmitterFilter() *EmitterFilter
func (*FilterEntry) GetFilter ¶
func (m *FilterEntry) GetFilter() isFilterEntry_Filter
func (*FilterEntry) ProtoMessage ¶
func (*FilterEntry) ProtoMessage()
func (*FilterEntry) ProtoReflect ¶
func (x *FilterEntry) ProtoReflect() protoreflect.Message
func (*FilterEntry) Reset ¶
func (x *FilterEntry) Reset()
func (*FilterEntry) String ¶
func (x *FilterEntry) String() string
type FilterEntry_BatchFilter ¶
type FilterEntry_BatchFilter struct {
BatchFilter *BatchFilter `protobuf:"bytes,2,opt,name=batch_filter,json=batchFilter,proto3,oneof"`
}
type FilterEntry_BatchTransactionFilter ¶
type FilterEntry_BatchTransactionFilter struct {
BatchTransactionFilter *BatchTransactionFilter `protobuf:"bytes,3,opt,name=batch_transaction_filter,json=batchTransactionFilter,proto3,oneof"`
}
type FilterEntry_EmitterFilter ¶
type FilterEntry_EmitterFilter struct {
EmitterFilter *EmitterFilter `protobuf:"bytes,1,opt,name=emitter_filter,json=emitterFilter,proto3,oneof"`
}
type SpyRPCServiceClient ¶
type SpyRPCServiceClient interface { // SubscribeSignedVAA returns a stream of signed VAA messages received on the network. SubscribeSignedVAA(ctx context.Context, in *SubscribeSignedVAARequest, opts ...grpc.CallOption) (SpyRPCService_SubscribeSignedVAAClient, error) }
SpyRPCServiceClient is the client API for SpyRPCService 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 NewSpyRPCServiceClient ¶
func NewSpyRPCServiceClient(cc grpc.ClientConnInterface) SpyRPCServiceClient
type SpyRPCServiceServer ¶
type SpyRPCServiceServer interface { // SubscribeSignedVAA returns a stream of signed VAA messages received on the network. SubscribeSignedVAA(*SubscribeSignedVAARequest, SpyRPCService_SubscribeSignedVAAServer) error // contains filtered or unexported methods }
SpyRPCServiceServer is the server API for SpyRPCService service. All implementations must embed UnimplementedSpyRPCServiceServer for forward compatibility
type SpyRPCService_SubscribeSignedVAAClient ¶
type SpyRPCService_SubscribeSignedVAAClient interface { Recv() (*SubscribeSignedVAAResponse, error) grpc.ClientStream }
type SpyRPCService_SubscribeSignedVAAServer ¶
type SpyRPCService_SubscribeSignedVAAServer interface { Send(*SubscribeSignedVAAResponse) error grpc.ServerStream }
type SubscribeSignedVAARequest ¶
type SubscribeSignedVAARequest struct { // List of filters to apply to the stream (OR). // If empty, all messages are streamed. Filters []*FilterEntry `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` // contains filtered or unexported fields }
func (*SubscribeSignedVAARequest) Descriptor
deprecated
func (*SubscribeSignedVAARequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeSignedVAARequest.ProtoReflect.Descriptor instead.
func (*SubscribeSignedVAARequest) GetFilters ¶
func (x *SubscribeSignedVAARequest) GetFilters() []*FilterEntry
func (*SubscribeSignedVAARequest) ProtoMessage ¶
func (*SubscribeSignedVAARequest) ProtoMessage()
func (*SubscribeSignedVAARequest) ProtoReflect ¶
func (x *SubscribeSignedVAARequest) ProtoReflect() protoreflect.Message
func (*SubscribeSignedVAARequest) Reset ¶
func (x *SubscribeSignedVAARequest) Reset()
func (*SubscribeSignedVAARequest) String ¶
func (x *SubscribeSignedVAARequest) String() string
type SubscribeSignedVAAResponse ¶
type SubscribeSignedVAAResponse struct { // Raw VAA bytes VaaBytes []byte `protobuf:"bytes,1,opt,name=vaa_bytes,json=vaaBytes,proto3" json:"vaa_bytes,omitempty"` // contains filtered or unexported fields }
func (*SubscribeSignedVAAResponse) Descriptor
deprecated
func (*SubscribeSignedVAAResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeSignedVAAResponse.ProtoReflect.Descriptor instead.
func (*SubscribeSignedVAAResponse) GetVaaBytes ¶
func (x *SubscribeSignedVAAResponse) GetVaaBytes() []byte
func (*SubscribeSignedVAAResponse) ProtoMessage ¶
func (*SubscribeSignedVAAResponse) ProtoMessage()
func (*SubscribeSignedVAAResponse) ProtoReflect ¶
func (x *SubscribeSignedVAAResponse) ProtoReflect() protoreflect.Message
func (*SubscribeSignedVAAResponse) Reset ¶
func (x *SubscribeSignedVAAResponse) Reset()
func (*SubscribeSignedVAAResponse) String ¶
func (x *SubscribeSignedVAAResponse) String() string
type UnimplementedSpyRPCServiceServer ¶
type UnimplementedSpyRPCServiceServer struct { }
UnimplementedSpyRPCServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSpyRPCServiceServer) SubscribeSignedVAA ¶
func (UnimplementedSpyRPCServiceServer) SubscribeSignedVAA(*SubscribeSignedVAARequest, SpyRPCService_SubscribeSignedVAAServer) error
type UnsafeSpyRPCServiceServer ¶
type UnsafeSpyRPCServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSpyRPCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SpyRPCServiceServer will result in compilation errors.