probe

package
v0.0.0-...-41ef929 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlockchain = errors.New("unsupport blockchain", errVendor, errors.WithCode(-1))
	ErrChainID    = errors.New("unsupport blockchain ID", errVendor, errors.WithCode(-2))
)

Errors .

Functions

func New

func New(config scf4go.Config) (grpcservice.Service, error)

New create new probe instance

func RegisterProbeServer

func RegisterProbeServer(s *grpc.Server, srv ProbeServer)

Types

type JobRequest

type JobRequest struct {
	Blockchain           types.Blockchain `protobuf:"varint,1,opt,name=blockchain,proto3,enum=types.Blockchain" json:"blockchain,omitempty"`
	ChainId              string           `protobuf:"bytes,2,opt,name=chainId,proto3" json:"chainId,omitempty"`
	RemoteUrl            string           `protobuf:"bytes,3,opt,name=remoteUrl,proto3" json:"remoteUrl,omitempty"`
	Offset               uint64           `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	Count                int64            `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	Backoff              uint64           `protobuf:"varint,6,opt,name=backoff,proto3" json:"backoff,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*JobRequest) Descriptor

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

func (*JobRequest) GetBackoff

func (m *JobRequest) GetBackoff() uint64

func (*JobRequest) GetBlockchain

func (m *JobRequest) GetBlockchain() types.Blockchain

func (*JobRequest) GetChainId

func (m *JobRequest) GetChainId() string

func (*JobRequest) GetCount

func (m *JobRequest) GetCount() int64

func (*JobRequest) GetOffset

func (m *JobRequest) GetOffset() uint64

func (*JobRequest) GetRemoteUrl

func (m *JobRequest) GetRemoteUrl() string

func (*JobRequest) ProtoMessage

func (*JobRequest) ProtoMessage()

func (*JobRequest) Reset

func (m *JobRequest) Reset()

func (*JobRequest) String

func (m *JobRequest) String() string

func (*JobRequest) XXX_DiscardUnknown

func (m *JobRequest) XXX_DiscardUnknown()

func (*JobRequest) XXX_Marshal

func (m *JobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobRequest) XXX_Merge

func (m *JobRequest) XXX_Merge(src proto.Message)

func (*JobRequest) XXX_Size

func (m *JobRequest) XXX_Size() int

func (*JobRequest) XXX_Unmarshal

func (m *JobRequest) XXX_Unmarshal(b []byte) error

type JobResponse

type JobResponse struct {
	Block                []byte   `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JobResponse) Descriptor

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

func (*JobResponse) GetBlock

func (m *JobResponse) GetBlock() []byte

func (*JobResponse) ProtoMessage

func (*JobResponse) ProtoMessage()

func (*JobResponse) Reset

func (m *JobResponse) Reset()

func (*JobResponse) String

func (m *JobResponse) String() string

func (*JobResponse) XXX_DiscardUnknown

func (m *JobResponse) XXX_DiscardUnknown()

func (*JobResponse) XXX_Marshal

func (m *JobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobResponse) XXX_Merge

func (m *JobResponse) XXX_Merge(src proto.Message)

func (*JobResponse) XXX_Size

func (m *JobResponse) XXX_Size() int

func (*JobResponse) XXX_Unmarshal

func (m *JobResponse) XXX_Unmarshal(b []byte) error

type ProbeClient

type ProbeClient interface {
	CreateJob(ctx context.Context, in *JobRequest, opts ...grpc.CallOption) (Probe_CreateJobClient, error)
}

ProbeClient is the client API for Probe service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewProbeClient

func NewProbeClient(cc *grpc.ClientConn) ProbeClient

type ProbeServer

type ProbeServer interface {
	CreateJob(*JobRequest, Probe_CreateJobServer) error
}

ProbeServer is the server API for Probe service.

type Probe_CreateJobClient

type Probe_CreateJobClient interface {
	Recv() (*JobResponse, error)
	grpc.ClientStream
}

type Probe_CreateJobServer

type Probe_CreateJobServer interface {
	Send(*JobResponse) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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