injective_meta_rpcpb

package
v1.36.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 15 Imported by: 4

Documentation

Overview

Package injective_meta_rpcpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_injective_meta_rpc_proto protoreflect.FileDescriptor
View Source
var InjectiveMetaRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "injective_meta_rpc.InjectiveMetaRPC",
	HandlerType: (*InjectiveMetaRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _InjectiveMetaRPC_Ping_Handler,
		},
		{
			MethodName: "Version",
			Handler:    _InjectiveMetaRPC_Version_Handler,
		},
		{
			MethodName: "Info",
			Handler:    _InjectiveMetaRPC_Info_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamKeepalive",
			Handler:       _InjectiveMetaRPC_StreamKeepalive_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "injective_meta_rpc.proto",
}

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

Functions

func RegisterInjectiveMetaRPCHandler added in v1.32.1

func RegisterInjectiveMetaRPCHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterInjectiveMetaRPCHandler registers the http handlers for service InjectiveMetaRPC to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterInjectiveMetaRPCHandlerClient added in v1.32.1

func RegisterInjectiveMetaRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InjectiveMetaRPCClient) error

RegisterInjectiveMetaRPCHandlerClient registers the http handlers for service InjectiveMetaRPC to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InjectiveMetaRPCClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InjectiveMetaRPCClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InjectiveMetaRPCClient" to call the correct interceptors.

func RegisterInjectiveMetaRPCHandlerFromEndpoint added in v1.32.1

func RegisterInjectiveMetaRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterInjectiveMetaRPCHandlerFromEndpoint is same as RegisterInjectiveMetaRPCHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterInjectiveMetaRPCHandlerServer added in v1.32.1

func RegisterInjectiveMetaRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InjectiveMetaRPCServer) error

RegisterInjectiveMetaRPCHandlerServer registers the http handlers for service InjectiveMetaRPC to "mux". UnaryRPC :call InjectiveMetaRPCServer 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 RegisterInjectiveMetaRPCHandlerFromEndpoint instead.

func RegisterInjectiveMetaRPCServer

func RegisterInjectiveMetaRPCServer(s grpc.ServiceRegistrar, srv InjectiveMetaRPCServer)

Types

type InfoRequest

type InfoRequest struct {

	// Provide current system UNIX timestamp in millis
	Timestamp int64 `protobuf:"zigzag64,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoRequest) Descriptor deprecated

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

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) GetTimestamp

func (x *InfoRequest) GetTimestamp() int64

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect

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

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

type InfoResponse

type InfoResponse struct {

	// The original timestamp value in millis.
	Timestamp int64 `protobuf:"zigzag64,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// UNIX time on the server in millis.
	ServerTime int64 `protobuf:"zigzag64,2,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
	// injective-exchange code version.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// Additional build meta info.
	Build map[string]string `` /* 151-byte string literal not displayed */
	// Server's location region
	Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoResponse) Descriptor deprecated

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

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetBuild

func (x *InfoResponse) GetBuild() map[string]string

func (*InfoResponse) GetRegion

func (x *InfoResponse) GetRegion() string

func (*InfoResponse) GetServerTime

func (x *InfoResponse) GetServerTime() int64

func (*InfoResponse) GetTimestamp

func (x *InfoResponse) GetTimestamp() int64

func (*InfoResponse) GetVersion

func (x *InfoResponse) GetVersion() string

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect

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

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

type InjectiveMetaRPCClient

type InjectiveMetaRPCClient interface {
	// Endpoint for checking server health.
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// Returns injective-exchange version.
	Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error)
	// Gets connection info
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	// Stream keepalive, if server exits, a shutdown event will be sent over this
	// channel.
	StreamKeepalive(ctx context.Context, in *StreamKeepaliveRequest, opts ...grpc.CallOption) (InjectiveMetaRPC_StreamKeepaliveClient, error)
}

InjectiveMetaRPCClient is the client API for InjectiveMetaRPC 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 InjectiveMetaRPCServer

type InjectiveMetaRPCServer interface {
	// Endpoint for checking server health.
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// Returns injective-exchange version.
	Version(context.Context, *VersionRequest) (*VersionResponse, error)
	// Gets connection info
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
	// Stream keepalive, if server exits, a shutdown event will be sent over this
	// channel.
	StreamKeepalive(*StreamKeepaliveRequest, InjectiveMetaRPC_StreamKeepaliveServer) error
	// contains filtered or unexported methods
}

InjectiveMetaRPCServer is the server API for InjectiveMetaRPC service. All implementations must embed UnimplementedInjectiveMetaRPCServer for forward compatibility

type InjectiveMetaRPC_StreamKeepaliveClient

type InjectiveMetaRPC_StreamKeepaliveClient interface {
	Recv() (*StreamKeepaliveResponse, error)
	grpc.ClientStream
}

type InjectiveMetaRPC_StreamKeepaliveServer

type InjectiveMetaRPC_StreamKeepaliveServer interface {
	Send(*StreamKeepaliveResponse) error
	grpc.ServerStream
}

type PingRequest

type PingRequest struct {
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PingResponse

type PingResponse struct {
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type StreamKeepaliveRequest

type StreamKeepaliveRequest struct {
	// contains filtered or unexported fields
}

func (*StreamKeepaliveRequest) Descriptor deprecated

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

Deprecated: Use StreamKeepaliveRequest.ProtoReflect.Descriptor instead.

func (*StreamKeepaliveRequest) ProtoMessage

func (*StreamKeepaliveRequest) ProtoMessage()

func (*StreamKeepaliveRequest) ProtoReflect

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

func (*StreamKeepaliveRequest) Reset

func (x *StreamKeepaliveRequest) Reset()

func (*StreamKeepaliveRequest) String

func (x *StreamKeepaliveRequest) String() string

type StreamKeepaliveResponse

type StreamKeepaliveResponse struct {

	// Server event
	Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	// New conection endpoint for the gRPC API
	NewEndpoint string `protobuf:"bytes,2,opt,name=new_endpoint,json=newEndpoint,proto3" json:"new_endpoint,omitempty"`
	// Operation timestamp in UNIX millis.
	Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamKeepaliveResponse) Descriptor deprecated

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

Deprecated: Use StreamKeepaliveResponse.ProtoReflect.Descriptor instead.

func (*StreamKeepaliveResponse) GetEvent

func (x *StreamKeepaliveResponse) GetEvent() string

func (*StreamKeepaliveResponse) GetNewEndpoint

func (x *StreamKeepaliveResponse) GetNewEndpoint() string

func (*StreamKeepaliveResponse) GetTimestamp

func (x *StreamKeepaliveResponse) GetTimestamp() int64

func (*StreamKeepaliveResponse) ProtoMessage

func (*StreamKeepaliveResponse) ProtoMessage()

func (*StreamKeepaliveResponse) ProtoReflect

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

func (*StreamKeepaliveResponse) Reset

func (x *StreamKeepaliveResponse) Reset()

func (*StreamKeepaliveResponse) String

func (x *StreamKeepaliveResponse) String() string

type UnimplementedInjectiveMetaRPCServer

type UnimplementedInjectiveMetaRPCServer struct {
}

UnimplementedInjectiveMetaRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedInjectiveMetaRPCServer) Info

func (UnimplementedInjectiveMetaRPCServer) Ping

func (UnimplementedInjectiveMetaRPCServer) Version

type UnsafeInjectiveMetaRPCServer

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

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

type VersionRequest

type VersionRequest struct {
	// contains filtered or unexported fields
}

func (*VersionRequest) Descriptor deprecated

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

Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.

func (*VersionRequest) ProtoMessage

func (*VersionRequest) ProtoMessage()

func (*VersionRequest) ProtoReflect

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

func (*VersionRequest) Reset

func (x *VersionRequest) Reset()

func (*VersionRequest) String

func (x *VersionRequest) String() string

type VersionResponse

type VersionResponse struct {

	// injective-exchange code version.
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// Additional build meta info.
	Build map[string]string `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*VersionResponse) Descriptor deprecated

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

Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.

func (*VersionResponse) GetBuild

func (x *VersionResponse) GetBuild() map[string]string

func (*VersionResponse) GetVersion

func (x *VersionResponse) GetVersion() string

func (*VersionResponse) ProtoMessage

func (*VersionResponse) ProtoMessage()

func (*VersionResponse) ProtoReflect

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

func (*VersionResponse) Reset

func (x *VersionResponse) Reset()

func (*VersionResponse) String

func (x *VersionResponse) String() string

Jump to

Keyboard shortcuts

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