Documentation ¶
Index ¶
- Variables
- func RegisterProxyServer(s *grpc.Server, srv ProxyServer)
- type CreateProxyRequest
- func (*CreateProxyRequest) Descriptor() ([]byte, []int)
- func (this *CreateProxyRequest) Equal(that interface{}) bool
- func (m *CreateProxyRequest) GetProxyItem() *ProxyItem
- func (this *CreateProxyRequest) GoString() string
- func (m *CreateProxyRequest) Marshal() (dAtA []byte, err error)
- func (m *CreateProxyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateProxyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CreateProxyRequest) ProtoMessage()
- func (m *CreateProxyRequest) Reset()
- func (m *CreateProxyRequest) Size() (n int)
- func (this *CreateProxyRequest) String() string
- func (m *CreateProxyRequest) Unmarshal(dAtA []byte) error
- func (m *CreateProxyRequest) XXX_DiscardUnknown()
- func (m *CreateProxyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateProxyRequest) XXX_Merge(src proto.Message)
- func (m *CreateProxyRequest) XXX_Size() int
- func (m *CreateProxyRequest) XXX_Unmarshal(b []byte) error
- type CreateProxyResponse
- func (*CreateProxyResponse) Descriptor() ([]byte, []int)
- func (this *CreateProxyResponse) Equal(that interface{}) bool
- func (m *CreateProxyResponse) GetProxyItem() *ProxyItem
- func (this *CreateProxyResponse) GoString() string
- func (m *CreateProxyResponse) Marshal() (dAtA []byte, err error)
- func (m *CreateProxyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateProxyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CreateProxyResponse) ProtoMessage()
- func (m *CreateProxyResponse) Reset()
- func (m *CreateProxyResponse) Size() (n int)
- func (this *CreateProxyResponse) String() string
- func (m *CreateProxyResponse) Unmarshal(dAtA []byte) error
- func (m *CreateProxyResponse) XXX_DiscardUnknown()
- func (m *CreateProxyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateProxyResponse) XXX_Merge(src proto.Message)
- func (m *CreateProxyResponse) XXX_Size() int
- func (m *CreateProxyResponse) XXX_Unmarshal(b []byte) error
- type CreateProxyStatRequest
- func (*CreateProxyStatRequest) Descriptor() ([]byte, []int)
- func (this *CreateProxyStatRequest) Equal(that interface{}) bool
- func (m *CreateProxyStatRequest) GetProxyStat() *ProxyStat
- func (this *CreateProxyStatRequest) GoString() string
- func (m *CreateProxyStatRequest) Marshal() (dAtA []byte, err error)
- func (m *CreateProxyStatRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateProxyStatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CreateProxyStatRequest) ProtoMessage()
- func (m *CreateProxyStatRequest) Reset()
- func (m *CreateProxyStatRequest) Size() (n int)
- func (this *CreateProxyStatRequest) String() string
- func (m *CreateProxyStatRequest) Unmarshal(dAtA []byte) error
- func (m *CreateProxyStatRequest) XXX_DiscardUnknown()
- func (m *CreateProxyStatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateProxyStatRequest) XXX_Merge(src proto.Message)
- func (m *CreateProxyStatRequest) XXX_Size() int
- func (m *CreateProxyStatRequest) XXX_Unmarshal(b []byte) error
- type CreateProxyStatResponse
- func (*CreateProxyStatResponse) Descriptor() ([]byte, []int)
- func (this *CreateProxyStatResponse) Equal(that interface{}) bool
- func (m *CreateProxyStatResponse) GetProxyStat() *ProxyStat
- func (this *CreateProxyStatResponse) GoString() string
- func (m *CreateProxyStatResponse) Marshal() (dAtA []byte, err error)
- func (m *CreateProxyStatResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateProxyStatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CreateProxyStatResponse) ProtoMessage()
- func (m *CreateProxyStatResponse) Reset()
- func (m *CreateProxyStatResponse) Size() (n int)
- func (this *CreateProxyStatResponse) String() string
- func (m *CreateProxyStatResponse) Unmarshal(dAtA []byte) error
- func (m *CreateProxyStatResponse) XXX_DiscardUnknown()
- func (m *CreateProxyStatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateProxyStatResponse) XXX_Merge(src proto.Message)
- func (m *CreateProxyStatResponse) XXX_Size() int
- func (m *CreateProxyStatResponse) XXX_Unmarshal(b []byte) error
- type GetBestProxyRequest
- func (*GetBestProxyRequest) Descriptor() ([]byte, []int)
- func (this *GetBestProxyRequest) Equal(that interface{}) bool
- func (this *GetBestProxyRequest) GoString() string
- func (m *GetBestProxyRequest) Marshal() (dAtA []byte, err error)
- func (m *GetBestProxyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetBestProxyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetBestProxyRequest) ProtoMessage()
- func (m *GetBestProxyRequest) Reset()
- func (m *GetBestProxyRequest) Size() (n int)
- func (this *GetBestProxyRequest) String() string
- func (m *GetBestProxyRequest) Unmarshal(dAtA []byte) error
- func (m *GetBestProxyRequest) XXX_DiscardUnknown()
- func (m *GetBestProxyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetBestProxyRequest) XXX_Merge(src proto.Message)
- func (m *GetBestProxyRequest) XXX_Size() int
- func (m *GetBestProxyRequest) XXX_Unmarshal(b []byte) error
- type GetBestProxyResponse
- func (*GetBestProxyResponse) Descriptor() ([]byte, []int)
- func (this *GetBestProxyResponse) Equal(that interface{}) bool
- func (m *GetBestProxyResponse) GetProxyItem() *ProxyItem
- func (this *GetBestProxyResponse) GoString() string
- func (m *GetBestProxyResponse) Marshal() (dAtA []byte, err error)
- func (m *GetBestProxyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetBestProxyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetBestProxyResponse) ProtoMessage()
- func (m *GetBestProxyResponse) Reset()
- func (m *GetBestProxyResponse) Size() (n int)
- func (this *GetBestProxyResponse) String() string
- func (m *GetBestProxyResponse) Unmarshal(dAtA []byte) error
- func (m *GetBestProxyResponse) XXX_DiscardUnknown()
- func (m *GetBestProxyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetBestProxyResponse) XXX_Merge(src proto.Message)
- func (m *GetBestProxyResponse) XXX_Size() int
- func (m *GetBestProxyResponse) XXX_Unmarshal(b []byte) error
- type GetNextProxyRequest
- func (*GetNextProxyRequest) Descriptor() ([]byte, []int)
- func (this *GetNextProxyRequest) Equal(that interface{}) bool
- func (this *GetNextProxyRequest) GoString() string
- func (m *GetNextProxyRequest) Marshal() (dAtA []byte, err error)
- func (m *GetNextProxyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetNextProxyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetNextProxyRequest) ProtoMessage()
- func (m *GetNextProxyRequest) Reset()
- func (m *GetNextProxyRequest) Size() (n int)
- func (this *GetNextProxyRequest) String() string
- func (m *GetNextProxyRequest) Unmarshal(dAtA []byte) error
- func (m *GetNextProxyRequest) XXX_DiscardUnknown()
- func (m *GetNextProxyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetNextProxyRequest) XXX_Merge(src proto.Message)
- func (m *GetNextProxyRequest) XXX_Size() int
- func (m *GetNextProxyRequest) XXX_Unmarshal(b []byte) error
- type GetNextProxyResponse
- func (*GetNextProxyResponse) Descriptor() ([]byte, []int)
- func (this *GetNextProxyResponse) Equal(that interface{}) bool
- func (m *GetNextProxyResponse) GetProxyItem() *ProxyItem
- func (this *GetNextProxyResponse) GoString() string
- func (m *GetNextProxyResponse) Marshal() (dAtA []byte, err error)
- func (m *GetNextProxyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetNextProxyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetNextProxyResponse) ProtoMessage()
- func (m *GetNextProxyResponse) Reset()
- func (m *GetNextProxyResponse) Size() (n int)
- func (this *GetNextProxyResponse) String() string
- func (m *GetNextProxyResponse) Unmarshal(dAtA []byte) error
- func (m *GetNextProxyResponse) XXX_DiscardUnknown()
- func (m *GetNextProxyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetNextProxyResponse) XXX_Merge(src proto.Message)
- func (m *GetNextProxyResponse) XXX_Size() int
- func (m *GetNextProxyResponse) XXX_Unmarshal(b []byte) error
- type ProxyClient
- type ProxyCountry
- func (*ProxyCountry) Descriptor() ([]byte, []int)
- func (this *ProxyCountry) Equal(that interface{}) bool
- func (m *ProxyCountry) GetCountryCode() string
- func (m *ProxyCountry) GetCountryId() int64
- func (m *ProxyCountry) GetCountryName() string
- func (m *ProxyCountry) GetCreatedAt() *time.Time
- func (this *ProxyCountry) GoString() string
- func (m *ProxyCountry) Marshal() (dAtA []byte, err error)
- func (m *ProxyCountry) MarshalTo(dAtA []byte) (int, error)
- func (m *ProxyCountry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProxyCountry) ProtoMessage()
- func (m *ProxyCountry) Reset()
- func (m *ProxyCountry) Size() (n int)
- func (this *ProxyCountry) String() string
- func (m *ProxyCountry) Unmarshal(dAtA []byte) error
- func (m *ProxyCountry) XXX_DiscardUnknown()
- func (m *ProxyCountry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProxyCountry) XXX_Merge(src proto.Message)
- func (m *ProxyCountry) XXX_Size() int
- func (m *ProxyCountry) XXX_Unmarshal(b []byte) error
- type ProxyItem
- func (*ProxyItem) Descriptor() ([]byte, []int)
- func (this *ProxyItem) Equal(that interface{}) bool
- func (m *ProxyItem) GetAnonymity() string
- func (m *ProxyItem) GetCreatedAt() *time.Time
- func (m *ProxyItem) GetDeletedAt() *time.Time
- func (m *ProxyItem) GetProxyCountry() *ProxyCountry
- func (m *ProxyItem) GetProxyId() int64
- func (m *ProxyItem) GetProxyIp() string
- func (m *ProxyItem) GetProxyPort() int64
- func (m *ProxyItem) GetUpdatedAt() *time.Time
- func (this *ProxyItem) GoString() string
- func (m *ProxyItem) Marshal() (dAtA []byte, err error)
- func (m *ProxyItem) MarshalTo(dAtA []byte) (int, error)
- func (m *ProxyItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProxyItem) ProtoMessage()
- func (m *ProxyItem) Reset()
- func (m *ProxyItem) Size() (n int)
- func (this *ProxyItem) String() string
- func (m *ProxyItem) Unmarshal(dAtA []byte) error
- func (m *ProxyItem) XXX_DiscardUnknown()
- func (m *ProxyItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProxyItem) XXX_Merge(src proto.Message)
- func (m *ProxyItem) XXX_Size() int
- func (m *ProxyItem) XXX_Unmarshal(b []byte) error
- type ProxyServer
- type ProxyStat
- func (*ProxyStat) Descriptor() ([]byte, []int)
- func (this *ProxyStat) Equal(that interface{}) bool
- func (m *ProxyStat) GetConnStatus() bool
- func (m *ProxyStat) GetConnTime() int64
- func (m *ProxyStat) GetCreatedAt() *time.Time
- func (m *ProxyStat) GetProxyId() int64
- func (this *ProxyStat) GoString() string
- func (m *ProxyStat) Marshal() (dAtA []byte, err error)
- func (m *ProxyStat) MarshalTo(dAtA []byte) (int, error)
- func (m *ProxyStat) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProxyStat) ProtoMessage()
- func (m *ProxyStat) Reset()
- func (m *ProxyStat) Size() (n int)
- func (this *ProxyStat) String() string
- func (m *ProxyStat) Unmarshal(dAtA []byte) error
- func (m *ProxyStat) XXX_DiscardUnknown()
- func (m *ProxyStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProxyStat) XXX_Merge(src proto.Message)
- func (m *ProxyStat) XXX_Size() int
- func (m *ProxyStat) XXX_Unmarshal(b []byte) error
- type Server
- func (s *Server) CreateProxy(ctx context.Context, req *CreateProxyRequest) (*CreateProxyResponse, error)
- func (s *Server) CreateProxyStat(ctx context.Context, req *CreateProxyStatRequest) (*CreateProxyStatResponse, error)
- func (s *Server) GetNextProxy(ctx context.Context, req *GetNextProxyRequest) (*GetNextProxyResponse, error)
- func (s *Server) GracefulStop()
- func (s *Server) Serve() error
- type Store
- func (s *Store) CreateProxyStat(ctx context.Context, stat *ProxyStat) error
- func (s *Store) GetNextProxyItem(ctx context.Context) (*ProxyItem, error)
- func (s *Store) GetNextProxyItemBatch(ctx context.Context, size int) error
- func (s *Store) GetOrCreateProxyCountry(c *ProxyCountry) error
- func (s *Store) GetOrCreateProxyItem(ctx context.Context, p *ProxyItem) error
- func (s *Store) InsertProxyCountry(c *ProxyCountry) error
- func (s *Store) InsertProxyItem(p *ProxyItem) error
- func (s *Store) NextProxyItemProducer(ctx context.Context) (ProxyItem, error)
- func (s *Store) SelectProxyCountryIdByCode(c *ProxyCountry) error
- func (s *Store) SelectProxyIdByUI(p *ProxyItem) error
- type UnimplementedProxyServer
- func (*UnimplementedProxyServer) CreateProxy(ctx context.Context, req *CreateProxyRequest) (*CreateProxyResponse, error)
- func (*UnimplementedProxyServer) CreateProxyStat(ctx context.Context, req *CreateProxyStatRequest) (*CreateProxyStatResponse, error)
- func (*UnimplementedProxyServer) GetBestProxy(ctx context.Context, req *GetBestProxyRequest) (*GetBestProxyResponse, error)
- func (*UnimplementedProxyServer) GetNextProxy(ctx context.Context, req *GetNextProxyRequest) (*GetNextProxyResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthProxy = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProxy = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupProxy = fmt.Errorf("proto: unexpected end of group") )
View Source
var ErrNoRows = errors.New("no rows in result set")
View Source
var ErrQueryTooOften = errors.New("query too often, need to wait")
Functions ¶
func RegisterProxyServer ¶
func RegisterProxyServer(s *grpc.Server, srv ProxyServer)
Types ¶
type CreateProxyRequest ¶
type CreateProxyRequest struct {
ProxyItem *ProxyItem `protobuf:"bytes,1,opt,name=proxy_item,json=proxyItem,proto3" json:"proxy_item,omitempty"`
}
func NewPopulatedCreateProxyRequest ¶
func NewPopulatedCreateProxyRequest(r randyProxy, easy bool) *CreateProxyRequest
func (*CreateProxyRequest) Descriptor ¶
func (*CreateProxyRequest) Descriptor() ([]byte, []int)
func (*CreateProxyRequest) Equal ¶
func (this *CreateProxyRequest) Equal(that interface{}) bool
func (*CreateProxyRequest) GetProxyItem ¶
func (m *CreateProxyRequest) GetProxyItem() *ProxyItem
func (*CreateProxyRequest) GoString ¶
func (this *CreateProxyRequest) GoString() string
func (*CreateProxyRequest) Marshal ¶
func (m *CreateProxyRequest) Marshal() (dAtA []byte, err error)
func (*CreateProxyRequest) MarshalTo ¶
func (m *CreateProxyRequest) MarshalTo(dAtA []byte) (int, error)
func (*CreateProxyRequest) MarshalToSizedBuffer ¶
func (m *CreateProxyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateProxyRequest) ProtoMessage ¶
func (*CreateProxyRequest) ProtoMessage()
func (*CreateProxyRequest) Reset ¶
func (m *CreateProxyRequest) Reset()
func (*CreateProxyRequest) Size ¶
func (m *CreateProxyRequest) Size() (n int)
func (*CreateProxyRequest) String ¶
func (this *CreateProxyRequest) String() string
func (*CreateProxyRequest) Unmarshal ¶
func (m *CreateProxyRequest) Unmarshal(dAtA []byte) error
func (*CreateProxyRequest) XXX_DiscardUnknown ¶
func (m *CreateProxyRequest) XXX_DiscardUnknown()
func (*CreateProxyRequest) XXX_Marshal ¶
func (m *CreateProxyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateProxyRequest) XXX_Merge ¶
func (m *CreateProxyRequest) XXX_Merge(src proto.Message)
func (*CreateProxyRequest) XXX_Size ¶
func (m *CreateProxyRequest) XXX_Size() int
func (*CreateProxyRequest) XXX_Unmarshal ¶
func (m *CreateProxyRequest) XXX_Unmarshal(b []byte) error
type CreateProxyResponse ¶
type CreateProxyResponse struct {
ProxyItem *ProxyItem `protobuf:"bytes,1,opt,name=proxy_item,json=proxyItem,proto3" json:"proxy_item,omitempty"`
}
func NewPopulatedCreateProxyResponse ¶
func NewPopulatedCreateProxyResponse(r randyProxy, easy bool) *CreateProxyResponse
func (*CreateProxyResponse) Descriptor ¶
func (*CreateProxyResponse) Descriptor() ([]byte, []int)
func (*CreateProxyResponse) Equal ¶
func (this *CreateProxyResponse) Equal(that interface{}) bool
func (*CreateProxyResponse) GetProxyItem ¶
func (m *CreateProxyResponse) GetProxyItem() *ProxyItem
func (*CreateProxyResponse) GoString ¶
func (this *CreateProxyResponse) GoString() string
func (*CreateProxyResponse) Marshal ¶
func (m *CreateProxyResponse) Marshal() (dAtA []byte, err error)
func (*CreateProxyResponse) MarshalTo ¶
func (m *CreateProxyResponse) MarshalTo(dAtA []byte) (int, error)
func (*CreateProxyResponse) MarshalToSizedBuffer ¶
func (m *CreateProxyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateProxyResponse) ProtoMessage ¶
func (*CreateProxyResponse) ProtoMessage()
func (*CreateProxyResponse) Reset ¶
func (m *CreateProxyResponse) Reset()
func (*CreateProxyResponse) Size ¶
func (m *CreateProxyResponse) Size() (n int)
func (*CreateProxyResponse) String ¶
func (this *CreateProxyResponse) String() string
func (*CreateProxyResponse) Unmarshal ¶
func (m *CreateProxyResponse) Unmarshal(dAtA []byte) error
func (*CreateProxyResponse) XXX_DiscardUnknown ¶
func (m *CreateProxyResponse) XXX_DiscardUnknown()
func (*CreateProxyResponse) XXX_Marshal ¶
func (m *CreateProxyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateProxyResponse) XXX_Merge ¶
func (m *CreateProxyResponse) XXX_Merge(src proto.Message)
func (*CreateProxyResponse) XXX_Size ¶
func (m *CreateProxyResponse) XXX_Size() int
func (*CreateProxyResponse) XXX_Unmarshal ¶
func (m *CreateProxyResponse) XXX_Unmarshal(b []byte) error
type CreateProxyStatRequest ¶
type CreateProxyStatRequest struct {
ProxyStat *ProxyStat `protobuf:"bytes,1,opt,name=proxy_stat,json=proxyStat,proto3" json:"proxy_stat,omitempty"`
}
func NewPopulatedCreateProxyStatRequest ¶
func NewPopulatedCreateProxyStatRequest(r randyProxy, easy bool) *CreateProxyStatRequest
func (*CreateProxyStatRequest) Descriptor ¶
func (*CreateProxyStatRequest) Descriptor() ([]byte, []int)
func (*CreateProxyStatRequest) Equal ¶
func (this *CreateProxyStatRequest) Equal(that interface{}) bool
func (*CreateProxyStatRequest) GetProxyStat ¶
func (m *CreateProxyStatRequest) GetProxyStat() *ProxyStat
func (*CreateProxyStatRequest) GoString ¶
func (this *CreateProxyStatRequest) GoString() string
func (*CreateProxyStatRequest) Marshal ¶
func (m *CreateProxyStatRequest) Marshal() (dAtA []byte, err error)
func (*CreateProxyStatRequest) MarshalTo ¶
func (m *CreateProxyStatRequest) MarshalTo(dAtA []byte) (int, error)
func (*CreateProxyStatRequest) MarshalToSizedBuffer ¶
func (m *CreateProxyStatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateProxyStatRequest) ProtoMessage ¶
func (*CreateProxyStatRequest) ProtoMessage()
func (*CreateProxyStatRequest) Reset ¶
func (m *CreateProxyStatRequest) Reset()
func (*CreateProxyStatRequest) Size ¶
func (m *CreateProxyStatRequest) Size() (n int)
func (*CreateProxyStatRequest) String ¶
func (this *CreateProxyStatRequest) String() string
func (*CreateProxyStatRequest) Unmarshal ¶
func (m *CreateProxyStatRequest) Unmarshal(dAtA []byte) error
func (*CreateProxyStatRequest) XXX_DiscardUnknown ¶
func (m *CreateProxyStatRequest) XXX_DiscardUnknown()
func (*CreateProxyStatRequest) XXX_Marshal ¶
func (m *CreateProxyStatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateProxyStatRequest) XXX_Merge ¶
func (m *CreateProxyStatRequest) XXX_Merge(src proto.Message)
func (*CreateProxyStatRequest) XXX_Size ¶
func (m *CreateProxyStatRequest) XXX_Size() int
func (*CreateProxyStatRequest) XXX_Unmarshal ¶
func (m *CreateProxyStatRequest) XXX_Unmarshal(b []byte) error
type CreateProxyStatResponse ¶
type CreateProxyStatResponse struct {
ProxyStat *ProxyStat `protobuf:"bytes,1,opt,name=proxy_stat,json=proxyStat,proto3" json:"proxy_stat,omitempty"`
}
func NewPopulatedCreateProxyStatResponse ¶
func NewPopulatedCreateProxyStatResponse(r randyProxy, easy bool) *CreateProxyStatResponse
func (*CreateProxyStatResponse) Descriptor ¶
func (*CreateProxyStatResponse) Descriptor() ([]byte, []int)
func (*CreateProxyStatResponse) Equal ¶
func (this *CreateProxyStatResponse) Equal(that interface{}) bool
func (*CreateProxyStatResponse) GetProxyStat ¶
func (m *CreateProxyStatResponse) GetProxyStat() *ProxyStat
func (*CreateProxyStatResponse) GoString ¶
func (this *CreateProxyStatResponse) GoString() string
func (*CreateProxyStatResponse) Marshal ¶
func (m *CreateProxyStatResponse) Marshal() (dAtA []byte, err error)
func (*CreateProxyStatResponse) MarshalTo ¶
func (m *CreateProxyStatResponse) MarshalTo(dAtA []byte) (int, error)
func (*CreateProxyStatResponse) MarshalToSizedBuffer ¶
func (m *CreateProxyStatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateProxyStatResponse) ProtoMessage ¶
func (*CreateProxyStatResponse) ProtoMessage()
func (*CreateProxyStatResponse) Reset ¶
func (m *CreateProxyStatResponse) Reset()
func (*CreateProxyStatResponse) Size ¶
func (m *CreateProxyStatResponse) Size() (n int)
func (*CreateProxyStatResponse) String ¶
func (this *CreateProxyStatResponse) String() string
func (*CreateProxyStatResponse) Unmarshal ¶
func (m *CreateProxyStatResponse) Unmarshal(dAtA []byte) error
func (*CreateProxyStatResponse) XXX_DiscardUnknown ¶
func (m *CreateProxyStatResponse) XXX_DiscardUnknown()
func (*CreateProxyStatResponse) XXX_Marshal ¶
func (m *CreateProxyStatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateProxyStatResponse) XXX_Merge ¶
func (m *CreateProxyStatResponse) XXX_Merge(src proto.Message)
func (*CreateProxyStatResponse) XXX_Size ¶
func (m *CreateProxyStatResponse) XXX_Size() int
func (*CreateProxyStatResponse) XXX_Unmarshal ¶
func (m *CreateProxyStatResponse) XXX_Unmarshal(b []byte) error
type GetBestProxyRequest ¶
type GetBestProxyRequest struct { }
func NewPopulatedGetBestProxyRequest ¶
func NewPopulatedGetBestProxyRequest(r randyProxy, easy bool) *GetBestProxyRequest
func (*GetBestProxyRequest) Descriptor ¶
func (*GetBestProxyRequest) Descriptor() ([]byte, []int)
func (*GetBestProxyRequest) Equal ¶
func (this *GetBestProxyRequest) Equal(that interface{}) bool
func (*GetBestProxyRequest) GoString ¶
func (this *GetBestProxyRequest) GoString() string
func (*GetBestProxyRequest) Marshal ¶
func (m *GetBestProxyRequest) Marshal() (dAtA []byte, err error)
func (*GetBestProxyRequest) MarshalTo ¶
func (m *GetBestProxyRequest) MarshalTo(dAtA []byte) (int, error)
func (*GetBestProxyRequest) MarshalToSizedBuffer ¶
func (m *GetBestProxyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetBestProxyRequest) ProtoMessage ¶
func (*GetBestProxyRequest) ProtoMessage()
func (*GetBestProxyRequest) Reset ¶
func (m *GetBestProxyRequest) Reset()
func (*GetBestProxyRequest) Size ¶
func (m *GetBestProxyRequest) Size() (n int)
func (*GetBestProxyRequest) String ¶
func (this *GetBestProxyRequest) String() string
func (*GetBestProxyRequest) Unmarshal ¶
func (m *GetBestProxyRequest) Unmarshal(dAtA []byte) error
func (*GetBestProxyRequest) XXX_DiscardUnknown ¶
func (m *GetBestProxyRequest) XXX_DiscardUnknown()
func (*GetBestProxyRequest) XXX_Marshal ¶
func (m *GetBestProxyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetBestProxyRequest) XXX_Merge ¶
func (m *GetBestProxyRequest) XXX_Merge(src proto.Message)
func (*GetBestProxyRequest) XXX_Size ¶
func (m *GetBestProxyRequest) XXX_Size() int
func (*GetBestProxyRequest) XXX_Unmarshal ¶
func (m *GetBestProxyRequest) XXX_Unmarshal(b []byte) error
type GetBestProxyResponse ¶
type GetBestProxyResponse struct {
ProxyItem *ProxyItem `protobuf:"bytes,1,opt,name=proxy_item,json=proxyItem,proto3" json:"proxy_item,omitempty"`
}
func NewPopulatedGetBestProxyResponse ¶
func NewPopulatedGetBestProxyResponse(r randyProxy, easy bool) *GetBestProxyResponse
func (*GetBestProxyResponse) Descriptor ¶
func (*GetBestProxyResponse) Descriptor() ([]byte, []int)
func (*GetBestProxyResponse) Equal ¶
func (this *GetBestProxyResponse) Equal(that interface{}) bool
func (*GetBestProxyResponse) GetProxyItem ¶
func (m *GetBestProxyResponse) GetProxyItem() *ProxyItem
func (*GetBestProxyResponse) GoString ¶
func (this *GetBestProxyResponse) GoString() string
func (*GetBestProxyResponse) Marshal ¶
func (m *GetBestProxyResponse) Marshal() (dAtA []byte, err error)
func (*GetBestProxyResponse) MarshalTo ¶
func (m *GetBestProxyResponse) MarshalTo(dAtA []byte) (int, error)
func (*GetBestProxyResponse) MarshalToSizedBuffer ¶
func (m *GetBestProxyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetBestProxyResponse) ProtoMessage ¶
func (*GetBestProxyResponse) ProtoMessage()
func (*GetBestProxyResponse) Reset ¶
func (m *GetBestProxyResponse) Reset()
func (*GetBestProxyResponse) Size ¶
func (m *GetBestProxyResponse) Size() (n int)
func (*GetBestProxyResponse) String ¶
func (this *GetBestProxyResponse) String() string
func (*GetBestProxyResponse) Unmarshal ¶
func (m *GetBestProxyResponse) Unmarshal(dAtA []byte) error
func (*GetBestProxyResponse) XXX_DiscardUnknown ¶
func (m *GetBestProxyResponse) XXX_DiscardUnknown()
func (*GetBestProxyResponse) XXX_Marshal ¶
func (m *GetBestProxyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetBestProxyResponse) XXX_Merge ¶
func (m *GetBestProxyResponse) XXX_Merge(src proto.Message)
func (*GetBestProxyResponse) XXX_Size ¶
func (m *GetBestProxyResponse) XXX_Size() int
func (*GetBestProxyResponse) XXX_Unmarshal ¶
func (m *GetBestProxyResponse) XXX_Unmarshal(b []byte) error
type GetNextProxyRequest ¶
type GetNextProxyRequest struct { }
func NewPopulatedGetNextProxyRequest ¶
func NewPopulatedGetNextProxyRequest(r randyProxy, easy bool) *GetNextProxyRequest
func (*GetNextProxyRequest) Descriptor ¶
func (*GetNextProxyRequest) Descriptor() ([]byte, []int)
func (*GetNextProxyRequest) Equal ¶
func (this *GetNextProxyRequest) Equal(that interface{}) bool
func (*GetNextProxyRequest) GoString ¶
func (this *GetNextProxyRequest) GoString() string
func (*GetNextProxyRequest) Marshal ¶
func (m *GetNextProxyRequest) Marshal() (dAtA []byte, err error)
func (*GetNextProxyRequest) MarshalTo ¶
func (m *GetNextProxyRequest) MarshalTo(dAtA []byte) (int, error)
func (*GetNextProxyRequest) MarshalToSizedBuffer ¶
func (m *GetNextProxyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetNextProxyRequest) ProtoMessage ¶
func (*GetNextProxyRequest) ProtoMessage()
func (*GetNextProxyRequest) Reset ¶
func (m *GetNextProxyRequest) Reset()
func (*GetNextProxyRequest) Size ¶
func (m *GetNextProxyRequest) Size() (n int)
func (*GetNextProxyRequest) String ¶
func (this *GetNextProxyRequest) String() string
func (*GetNextProxyRequest) Unmarshal ¶
func (m *GetNextProxyRequest) Unmarshal(dAtA []byte) error
func (*GetNextProxyRequest) XXX_DiscardUnknown ¶
func (m *GetNextProxyRequest) XXX_DiscardUnknown()
func (*GetNextProxyRequest) XXX_Marshal ¶
func (m *GetNextProxyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetNextProxyRequest) XXX_Merge ¶
func (m *GetNextProxyRequest) XXX_Merge(src proto.Message)
func (*GetNextProxyRequest) XXX_Size ¶
func (m *GetNextProxyRequest) XXX_Size() int
func (*GetNextProxyRequest) XXX_Unmarshal ¶
func (m *GetNextProxyRequest) XXX_Unmarshal(b []byte) error
type GetNextProxyResponse ¶
type GetNextProxyResponse struct {
ProxyItem *ProxyItem `protobuf:"bytes,1,opt,name=proxy_item,json=proxyItem,proto3" json:"proxy_item,omitempty"`
}
func NewPopulatedGetNextProxyResponse ¶
func NewPopulatedGetNextProxyResponse(r randyProxy, easy bool) *GetNextProxyResponse
func (*GetNextProxyResponse) Descriptor ¶
func (*GetNextProxyResponse) Descriptor() ([]byte, []int)
func (*GetNextProxyResponse) Equal ¶
func (this *GetNextProxyResponse) Equal(that interface{}) bool
func (*GetNextProxyResponse) GetProxyItem ¶
func (m *GetNextProxyResponse) GetProxyItem() *ProxyItem
func (*GetNextProxyResponse) GoString ¶
func (this *GetNextProxyResponse) GoString() string
func (*GetNextProxyResponse) Marshal ¶
func (m *GetNextProxyResponse) Marshal() (dAtA []byte, err error)
func (*GetNextProxyResponse) MarshalTo ¶
func (m *GetNextProxyResponse) MarshalTo(dAtA []byte) (int, error)
func (*GetNextProxyResponse) MarshalToSizedBuffer ¶
func (m *GetNextProxyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetNextProxyResponse) ProtoMessage ¶
func (*GetNextProxyResponse) ProtoMessage()
func (*GetNextProxyResponse) Reset ¶
func (m *GetNextProxyResponse) Reset()
func (*GetNextProxyResponse) Size ¶
func (m *GetNextProxyResponse) Size() (n int)
func (*GetNextProxyResponse) String ¶
func (this *GetNextProxyResponse) String() string
func (*GetNextProxyResponse) Unmarshal ¶
func (m *GetNextProxyResponse) Unmarshal(dAtA []byte) error
func (*GetNextProxyResponse) XXX_DiscardUnknown ¶
func (m *GetNextProxyResponse) XXX_DiscardUnknown()
func (*GetNextProxyResponse) XXX_Marshal ¶
func (m *GetNextProxyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetNextProxyResponse) XXX_Merge ¶
func (m *GetNextProxyResponse) XXX_Merge(src proto.Message)
func (*GetNextProxyResponse) XXX_Size ¶
func (m *GetNextProxyResponse) XXX_Size() int
func (*GetNextProxyResponse) XXX_Unmarshal ¶
func (m *GetNextProxyResponse) XXX_Unmarshal(b []byte) error
type ProxyClient ¶
type ProxyClient interface { CreateProxy(ctx context.Context, in *CreateProxyRequest, opts ...grpc.CallOption) (*CreateProxyResponse, error) CreateProxyStat(ctx context.Context, in *CreateProxyStatRequest, opts ...grpc.CallOption) (*CreateProxyStatResponse, error) GetNextProxy(ctx context.Context, in *GetNextProxyRequest, opts ...grpc.CallOption) (*GetNextProxyResponse, error) GetBestProxy(ctx context.Context, in *GetBestProxyRequest, opts ...grpc.CallOption) (*GetBestProxyResponse, error) }
ProxyClient is the client API for Proxy service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProxyClient ¶
func NewProxyClient(cc *grpc.ClientConn) ProxyClient
type ProxyCountry ¶
type ProxyCountry struct { CountryId int64 `protobuf:"varint,1,opt,name=country_id,json=countryId,proto3" json:"country_id,omitempty"` CountryName string `protobuf:"bytes,2,opt,name=country_name,json=countryName,proto3" json:"country_name,omitempty"` CountryCode string `protobuf:"bytes,3,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"` CreatedAt *time.Time `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` }
func NewPopulatedProxyCountry ¶
func NewPopulatedProxyCountry(r randyProxy, easy bool) *ProxyCountry
func (*ProxyCountry) Descriptor ¶
func (*ProxyCountry) Descriptor() ([]byte, []int)
func (*ProxyCountry) Equal ¶
func (this *ProxyCountry) Equal(that interface{}) bool
func (*ProxyCountry) GetCountryCode ¶
func (m *ProxyCountry) GetCountryCode() string
func (*ProxyCountry) GetCountryId ¶
func (m *ProxyCountry) GetCountryId() int64
func (*ProxyCountry) GetCountryName ¶
func (m *ProxyCountry) GetCountryName() string
func (*ProxyCountry) GetCreatedAt ¶
func (m *ProxyCountry) GetCreatedAt() *time.Time
func (*ProxyCountry) GoString ¶
func (this *ProxyCountry) GoString() string
func (*ProxyCountry) Marshal ¶
func (m *ProxyCountry) Marshal() (dAtA []byte, err error)
func (*ProxyCountry) MarshalToSizedBuffer ¶
func (m *ProxyCountry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProxyCountry) ProtoMessage ¶
func (*ProxyCountry) ProtoMessage()
func (*ProxyCountry) Reset ¶
func (m *ProxyCountry) Reset()
func (*ProxyCountry) Size ¶
func (m *ProxyCountry) Size() (n int)
func (*ProxyCountry) String ¶
func (this *ProxyCountry) String() string
func (*ProxyCountry) Unmarshal ¶
func (m *ProxyCountry) Unmarshal(dAtA []byte) error
func (*ProxyCountry) XXX_DiscardUnknown ¶
func (m *ProxyCountry) XXX_DiscardUnknown()
func (*ProxyCountry) XXX_Marshal ¶
func (m *ProxyCountry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProxyCountry) XXX_Merge ¶
func (m *ProxyCountry) XXX_Merge(src proto.Message)
func (*ProxyCountry) XXX_Size ¶
func (m *ProxyCountry) XXX_Size() int
func (*ProxyCountry) XXX_Unmarshal ¶
func (m *ProxyCountry) XXX_Unmarshal(b []byte) error
type ProxyItem ¶
type ProxyItem struct { ProxyId int64 `protobuf:"varint,1,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"` ProxyIp string `protobuf:"bytes,2,opt,name=proxy_ip,json=proxyIp,proto3" json:"proxy_ip,omitempty"` ProxyPort int64 `protobuf:"varint,3,opt,name=proxy_port,json=proxyPort,proto3" json:"proxy_port,omitempty"` Anonymity string `protobuf:"bytes,5,opt,name=anonymity,proto3" json:"anonymity,omitempty"` ProxyCountry *ProxyCountry `protobuf:"bytes,4,opt,name=proxy_country,json=proxyCountry,proto3" json:"proxy_country,omitempty"` CreatedAt *time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` UpdatedAt *time.Time `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"` DeletedAt *time.Time `protobuf:"bytes,8,opt,name=deleted_at,json=deletedAt,proto3,stdtime" json:"deleted_at,omitempty"` }
func NewPopulatedProxyItem ¶
func (*ProxyItem) Descriptor ¶
func (*ProxyItem) GetAnonymity ¶
func (*ProxyItem) GetCreatedAt ¶
func (*ProxyItem) GetDeletedAt ¶
func (*ProxyItem) GetProxyCountry ¶
func (m *ProxyItem) GetProxyCountry() *ProxyCountry
func (*ProxyItem) GetProxyId ¶
func (*ProxyItem) GetProxyIp ¶
func (*ProxyItem) GetProxyPort ¶
func (*ProxyItem) GetUpdatedAt ¶
func (*ProxyItem) MarshalToSizedBuffer ¶
func (*ProxyItem) ProtoMessage ¶
func (*ProxyItem) ProtoMessage()
func (*ProxyItem) XXX_DiscardUnknown ¶
func (m *ProxyItem) XXX_DiscardUnknown()
func (*ProxyItem) XXX_Marshal ¶
func (*ProxyItem) XXX_Unmarshal ¶
type ProxyServer ¶
type ProxyServer interface { CreateProxy(context.Context, *CreateProxyRequest) (*CreateProxyResponse, error) CreateProxyStat(context.Context, *CreateProxyStatRequest) (*CreateProxyStatResponse, error) GetNextProxy(context.Context, *GetNextProxyRequest) (*GetNextProxyResponse, error) GetBestProxy(context.Context, *GetBestProxyRequest) (*GetBestProxyResponse, error) }
ProxyServer is the server API for Proxy service.
type ProxyStat ¶
type ProxyStat struct { // Удалил бывший PK // int64 stat_id = 1; ProxyId int64 `protobuf:"varint,2,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"` ConnTime int64 `protobuf:"varint,3,opt,name=conn_time,json=connTime,proto3" json:"conn_time,omitempty"` ConnStatus bool `protobuf:"varint,4,opt,name=conn_status,json=connStatus,proto3" json:"conn_status,omitempty"` // Новый PK CreatedAt *time.Time `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` }
func NewPopulatedProxyStat ¶
func (*ProxyStat) Descriptor ¶
func (*ProxyStat) GetConnStatus ¶
func (*ProxyStat) GetConnTime ¶
func (*ProxyStat) GetCreatedAt ¶
func (*ProxyStat) GetProxyId ¶
func (*ProxyStat) MarshalToSizedBuffer ¶
func (*ProxyStat) ProtoMessage ¶
func (*ProxyStat) ProtoMessage()
func (*ProxyStat) XXX_DiscardUnknown ¶
func (m *ProxyStat) XXX_DiscardUnknown()
func (*ProxyStat) XXX_Marshal ¶
func (*ProxyStat) XXX_Unmarshal ¶
type Server ¶
type Server struct { UnimplementedProxyServer // contains filtered or unexported fields }
func (*Server) CreateProxy ¶
func (s *Server) CreateProxy(ctx context.Context, req *CreateProxyRequest) (*CreateProxyResponse, error)
func (*Server) CreateProxyStat ¶
func (s *Server) CreateProxyStat(ctx context.Context, req *CreateProxyStatRequest) (*CreateProxyStatResponse, error)
func (*Server) GetNextProxy ¶
func (s *Server) GetNextProxy(ctx context.Context, req *GetNextProxyRequest) (*GetNextProxyResponse, error)
GetNextProxy возвращает прокси которое нужно проверить. Возвращаются те которые еще не проверялись, либо отсортированные по времени проверки.
func (*Server) GracefulStop ¶
func (s *Server) GracefulStop()
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CreateProxyStat ¶
func (*Store) GetNextProxyItem ¶
func (*Store) GetNextProxyItemBatch ¶
func (*Store) GetOrCreateProxyCountry ¶
func (s *Store) GetOrCreateProxyCountry(c *ProxyCountry) error
func (*Store) GetOrCreateProxyItem ¶
func (*Store) InsertProxyCountry ¶
func (s *Store) InsertProxyCountry(c *ProxyCountry) error
func (*Store) InsertProxyItem ¶
func (*Store) NextProxyItemProducer ¶
NextProxyItemProducer вынимает ProxyItem из nextProxyQueue Если элемента нет, вызывает функцию пополнения, и повторяет попытку взять элемент
func (*Store) SelectProxyCountryIdByCode ¶
func (s *Store) SelectProxyCountryIdByCode(c *ProxyCountry) error
func (*Store) SelectProxyIdByUI ¶
type UnimplementedProxyServer ¶
type UnimplementedProxyServer struct { }
UnimplementedProxyServer can be embedded to have forward compatible implementations.
func (*UnimplementedProxyServer) CreateProxy ¶
func (*UnimplementedProxyServer) CreateProxy(ctx context.Context, req *CreateProxyRequest) (*CreateProxyResponse, error)
func (*UnimplementedProxyServer) CreateProxyStat ¶
func (*UnimplementedProxyServer) CreateProxyStat(ctx context.Context, req *CreateProxyStatRequest) (*CreateProxyStatResponse, error)
func (*UnimplementedProxyServer) GetBestProxy ¶
func (*UnimplementedProxyServer) GetBestProxy(ctx context.Context, req *GetBestProxyRequest) (*GetBestProxyResponse, error)
func (*UnimplementedProxyServer) GetNextProxy ¶
func (*UnimplementedProxyServer) GetNextProxy(ctx context.Context, req *GetNextProxyRequest) (*GetNextProxyResponse, error)
Click to show internal directories.
Click to hide internal directories.