rpc

package
v0.0.0-...-3404f59 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Protocol_name = map[int32]string{
	0: "UNKNOWN",
	1: "HTTPS",
	2: "SOCKS",
	3: "HTTP",
}
View Source
var Protocol_value = map[string]int32{
	"UNKNOWN": 0,
	"HTTPS":   1,
	"SOCKS":   2,
	"HTTP":    3,
}

Functions

func RegisterProxyPoolServer

func RegisterProxyPoolServer(s *grpc.Server, srv ProxyPoolServer)

Types

type Protocol

type Protocol int32
const (
	Protocol_UNKNOWN Protocol = 0
	Protocol_HTTPS   Protocol = 1
	Protocol_SOCKS   Protocol = 2
	Protocol_HTTP    Protocol = 3
)

func (Protocol) EnumDescriptor

func (Protocol) EnumDescriptor() ([]byte, []int)

func (Protocol) String

func (x Protocol) String() string

type Proxies

type Proxies struct {
	Counts               uint64   `protobuf:"varint,1,opt,name=Counts,json=counts,proto3" json:"Counts,omitempty"`
	Proxies              []*Proxy `protobuf:"bytes,2,rep,name=proxies,proto3" json:"proxies,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Proxies) Descriptor

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

func (*Proxies) GetCounts

func (m *Proxies) GetCounts() uint64

func (*Proxies) GetProxies

func (m *Proxies) GetProxies() []*Proxy

func (*Proxies) ProtoMessage

func (*Proxies) ProtoMessage()

func (*Proxies) Reset

func (m *Proxies) Reset()

func (*Proxies) String

func (m *Proxies) String() string

func (*Proxies) XXX_DiscardUnknown

func (m *Proxies) XXX_DiscardUnknown()

func (*Proxies) XXX_Marshal

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

func (*Proxies) XXX_Merge

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

func (*Proxies) XXX_Size

func (m *Proxies) XXX_Size() int

func (*Proxies) XXX_Unmarshal

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

type Proxy

type Proxy struct {
	Address              string               `protobuf:"bytes,1,opt,name=Address,json=address,proto3" json:"Address,omitempty"`
	Port                 uint64               `protobuf:"varint,2,opt,name=Port,json=port,proto3" json:"Port,omitempty"`
	Protocol             Protocol             `protobuf:"varint,3,opt,name=Protocol,json=protocol,proto3,enum=rpc.Protocol" json:"Protocol,omitempty"`
	LastCheck            *timestamp.Timestamp `protobuf:"bytes,4,opt,name=LastCheck,json=last_check,proto3" json:"LastCheck,omitempty"`
	Speed                uint64               `protobuf:"varint,5,opt,name=Speed,json=speed,proto3" json:"Speed,omitempty"`
	From                 string               `protobuf:"bytes,6,opt,name=From,json=from,proto3" json:"From,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Proxy) Descriptor

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

func (*Proxy) GetAddress

func (m *Proxy) GetAddress() string

func (*Proxy) GetFrom

func (m *Proxy) GetFrom() string

func (*Proxy) GetLastCheck

func (m *Proxy) GetLastCheck() *timestamp.Timestamp

func (*Proxy) GetPort

func (m *Proxy) GetPort() uint64

func (*Proxy) GetProtocol

func (m *Proxy) GetProtocol() Protocol

func (*Proxy) GetSpeed

func (m *Proxy) GetSpeed() uint64

func (*Proxy) ProtoMessage

func (*Proxy) ProtoMessage()

func (*Proxy) Reset

func (m *Proxy) Reset()

func (*Proxy) String

func (m *Proxy) String() string

func (*Proxy) XXX_DiscardUnknown

func (m *Proxy) XXX_DiscardUnknown()

func (*Proxy) XXX_Marshal

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

func (*Proxy) XXX_Merge

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

func (*Proxy) XXX_Size

func (m *Proxy) XXX_Size() int

func (*Proxy) XXX_Unmarshal

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

type ProxyPoolClient

type ProxyPoolClient interface {
	Add(ctx context.Context, in *Proxy, opts ...grpc.CallOption) (*empty.Empty, error)
	Random(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Proxy, error)
	All(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Proxies, error)
}

ProxyPoolClient is the client API for ProxyPool service.

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

func NewProxyPoolClient

func NewProxyPoolClient(cc *grpc.ClientConn) ProxyPoolClient

type ProxyPoolServer

type ProxyPoolServer interface {
	Add(context.Context, *Proxy) (*empty.Empty, error)
	Random(context.Context, *empty.Empty) (*Proxy, error)
	All(context.Context, *empty.Empty) (*Proxies, error)
}

ProxyPoolServer is the server API for ProxyPool service.

type UnimplementedProxyPoolServer

type UnimplementedProxyPoolServer struct {
}

UnimplementedProxyPoolServer can be embedded to have forward compatible implementations.

func (*UnimplementedProxyPoolServer) Add

func (*UnimplementedProxyPoolServer) All

func (*UnimplementedProxyPoolServer) Random

Jump to

Keyboard shortcuts

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