spyv1

package
v0.0.0-...-989067b Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package spyv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_spy_v1_spy_proto protoreflect.FileDescriptor
View Source
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 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
	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) 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_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.

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 (*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 (*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.

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.

Jump to

Keyboard shortcuts

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