Documentation
¶
Index ¶
- Variables
- func RegisterCrawlerServiceServer(s grpc.ServiceRegistrar, srv CrawlerServiceServer)
- type Action
- type AllowedDomain
- func (*AllowedDomain) Descriptor() ([]byte, []int)deprecated
- func (x *AllowedDomain) GetDomain() string
- func (x *AllowedDomain) GetUrlRegexValidator() string
- func (*AllowedDomain) ProtoMessage()
- func (x *AllowedDomain) ProtoReflect() protoreflect.Message
- func (x *AllowedDomain) Reset()
- func (x *AllowedDomain) String() string
- type Crawler
- func (*Crawler) Descriptor() ([]byte, []int)deprecated
- func (x *Crawler) GetAllowedDomain() []string
- func (x *Crawler) GetDisallowedDomain() []string
- func (x *Crawler) GetDurationInMinutes() uint32
- func (x *Crawler) GetMaxDepth() uint32
- func (x *Crawler) GetModified() *timestamppb.Timestamp
- func (x *Crawler) GetRules() []*Rule
- func (x *Crawler) GetSourceId() int32
- func (x *Crawler) GetStartUrl() string
- func (x *Crawler) GetStatus() Status
- func (x *Crawler) GetUrlRegexFilter() []string
- func (*Crawler) ProtoMessage()
- func (x *Crawler) ProtoReflect() protoreflect.Message
- func (x *Crawler) Reset()
- func (x *Crawler) String() string
- type CrawlerMessage
- type CrawlerServiceClient
- type CrawlerServiceServer
- type Enqueuer
- func (*Enqueuer) Descriptor() ([]byte, []int)deprecated
- func (x *Enqueuer) GetAllowedDomain() []*AllowedDomain
- func (x *Enqueuer) GetDurationInMinutes() uint32
- func (x *Enqueuer) GetMaxDepth() uint32
- func (x *Enqueuer) GetModified() *timestamppb.Timestamp
- func (x *Enqueuer) GetRules() []*Rule
- func (x *Enqueuer) GetSourceId() int32
- func (x *Enqueuer) GetStartUrl() string
- func (x *Enqueuer) GetStatus() Status
- func (*Enqueuer) ProtoMessage()
- func (x *Enqueuer) ProtoReflect() protoreflect.Message
- func (x *Enqueuer) Reset()
- func (x *Enqueuer) String() string
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)deprecated
- func (x *Rule) GetAction() Action
- func (x *Rule) GetAttribute() string
- func (x *Rule) GetName() string
- func (x *Rule) GetSelector() string
- func (*Rule) ProtoMessage()
- func (x *Rule) ProtoReflect() protoreflect.Message
- func (x *Rule) Reset()
- func (x *Rule) String() string
- type SourceIdMessage
- type Status
- type UnimplementedCrawlerServiceServer
- func (UnimplementedCrawlerServiceServer) CreateCrawler(context.Context, *CrawlerMessage) (*emptypb.Empty, error)
- func (UnimplementedCrawlerServiceServer) ListCrawler(context.Context, *SourceIdMessage) (*CrawlerMessage, error)
- func (UnimplementedCrawlerServiceServer) StartCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error)
- func (UnimplementedCrawlerServiceServer) StopCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error)
- type UnsafeCrawlerServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Action_name = map[int32]string{ 0: "SEARCH", 1: "DOWNLOAD", 2: "SCRAPE", } Action_value = map[string]int32{ "SEARCH": 0, "DOWNLOAD": 1, "SCRAPE": 2, } )
Enum value maps for Action.
var ( Status_name = map[int32]string{ 0: "STOPPED", 1: "STARTED", } Status_value = map[string]int32{ "STOPPED": 0, "STARTED": 1, } )
Enum value maps for Status.
var ( Action_name = map[int32]string{ 0: "SEARCH", 1: "DOWNLOAD", 2: "SCRAPE", } Action_value = map[string]int32{ "SEARCH": 0, "DOWNLOAD": 1, "SCRAPE": 2, } )
Enum value maps for Action.
var ( Status_name = map[int32]string{ 0: "STOPPED", 1: "STARTED", } Status_value = map[string]int32{ "STOPPED": 0, "STARTED": 1, } )
Enum value maps for Status.
var CrawlerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tickerscraper.v1.CrawlerService", HandlerType: (*CrawlerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCrawler", Handler: _CrawlerService_CreateCrawler_Handler, }, { MethodName: "ListCrawler", Handler: _CrawlerService_ListCrawler_Handler, }, { MethodName: "StartCrawler", Handler: _CrawlerService_StartCrawler_Handler, }, { MethodName: "StopCrawler", Handler: _CrawlerService_StopCrawler_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
CrawlerService_ServiceDesc is the grpc.ServiceDesc for CrawlerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto protoreflect.FileDescriptor
var File_crawler_proto protoreflect.FileDescriptor
var File_enqueuer_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCrawlerServiceServer ¶ added in v0.24.2
func RegisterCrawlerServiceServer(s grpc.ServiceRegistrar, srv CrawlerServiceServer)
Types ¶
type Action ¶ added in v0.24.2
type Action int32
const ( Action_SEARCH Action = 0 Action_DOWNLOAD Action = 1 Action_SCRAPE Action = 2 )
func (Action) Descriptor ¶ added in v0.24.2
func (Action) Descriptor() protoreflect.EnumDescriptor
func (Action) EnumDescriptor
deprecated
added in
v0.24.2
func (Action) Number ¶ added in v0.24.2
func (x Action) Number() protoreflect.EnumNumber
func (Action) Type ¶ added in v0.24.2
func (Action) Type() protoreflect.EnumType
type AllowedDomain ¶
type AllowedDomain struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` UrlRegexValidator string `protobuf:"bytes,2,opt,name=url_regex_validator,json=urlRegexValidator,proto3" json:"url_regex_validator,omitempty"` // contains filtered or unexported fields }
func (*AllowedDomain) Descriptor
deprecated
func (*AllowedDomain) Descriptor() ([]byte, []int)
Deprecated: Use AllowedDomain.ProtoReflect.Descriptor instead.
func (*AllowedDomain) GetDomain ¶
func (x *AllowedDomain) GetDomain() string
func (*AllowedDomain) GetUrlRegexValidator ¶
func (x *AllowedDomain) GetUrlRegexValidator() string
func (*AllowedDomain) ProtoMessage ¶
func (*AllowedDomain) ProtoMessage()
func (*AllowedDomain) ProtoReflect ¶
func (x *AllowedDomain) ProtoReflect() protoreflect.Message
func (*AllowedDomain) Reset ¶
func (x *AllowedDomain) Reset()
func (*AllowedDomain) String ¶
func (x *AllowedDomain) String() string
type Crawler ¶ added in v0.24.2
type Crawler struct { SourceId int32 `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` StartUrl string `protobuf:"bytes,2,opt,name=start_url,json=startUrl,proto3" json:"start_url,omitempty"` AllowedDomain []string `protobuf:"bytes,3,rep,name=allowed_domain,json=allowedDomain,proto3" json:"allowed_domain,omitempty"` DurationInMinutes uint32 `protobuf:"varint,4,opt,name=duration_in_minutes,json=durationInMinutes,proto3" json:"duration_in_minutes,omitempty"` MaxDepth uint32 `protobuf:"varint,5,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"` Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=tickerscraper.v1.Status" json:"status,omitempty"` Rules []*Rule `protobuf:"bytes,7,rep,name=rules,proto3" json:"rules,omitempty"` Modified *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=modified,proto3" json:"modified,omitempty"` DisallowedDomain []string `protobuf:"bytes,9,rep,name=disallowed_domain,json=disallowedDomain,proto3" json:"disallowed_domain,omitempty"` UrlRegexFilter []string `protobuf:"bytes,10,rep,name=url_regex_filter,json=urlRegexFilter,proto3" json:"url_regex_filter,omitempty"` // contains filtered or unexported fields }
Deal: A deal is the reflection of the fact of a trade operation execution based on an order that contains a trade request
func (*Crawler) Descriptor
deprecated
added in
v0.24.2
func (*Crawler) GetAllowedDomain ¶ added in v0.24.2
func (*Crawler) GetDisallowedDomain ¶ added in v0.24.2
func (*Crawler) GetDurationInMinutes ¶ added in v0.24.2
func (*Crawler) GetMaxDepth ¶ added in v0.24.2
func (*Crawler) GetModified ¶ added in v0.24.2
func (x *Crawler) GetModified() *timestamppb.Timestamp
func (*Crawler) GetSourceId ¶ added in v0.24.2
func (*Crawler) GetStartUrl ¶ added in v0.24.2
func (*Crawler) GetUrlRegexFilter ¶ added in v0.24.2
func (*Crawler) ProtoMessage ¶ added in v0.24.2
func (*Crawler) ProtoMessage()
func (*Crawler) ProtoReflect ¶ added in v0.24.2
func (x *Crawler) ProtoReflect() protoreflect.Message
type CrawlerMessage ¶ added in v0.24.2
type CrawlerMessage struct { Crawler *Crawler `protobuf:"bytes,1,opt,name=crawler,proto3" json:"crawler,omitempty"` // contains filtered or unexported fields }
func (*CrawlerMessage) Descriptor
deprecated
added in
v0.24.2
func (*CrawlerMessage) Descriptor() ([]byte, []int)
Deprecated: Use CrawlerMessage.ProtoReflect.Descriptor instead.
func (*CrawlerMessage) GetCrawler ¶ added in v0.24.2
func (x *CrawlerMessage) GetCrawler() *Crawler
func (*CrawlerMessage) ProtoMessage ¶ added in v0.24.2
func (*CrawlerMessage) ProtoMessage()
func (*CrawlerMessage) ProtoReflect ¶ added in v0.24.2
func (x *CrawlerMessage) ProtoReflect() protoreflect.Message
func (*CrawlerMessage) Reset ¶ added in v0.24.2
func (x *CrawlerMessage) Reset()
func (*CrawlerMessage) String ¶ added in v0.24.2
func (x *CrawlerMessage) String() string
type CrawlerServiceClient ¶ added in v0.24.2
type CrawlerServiceClient interface { CreateCrawler(ctx context.Context, in *CrawlerMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) ListCrawler(ctx context.Context, in *SourceIdMessage, opts ...grpc.CallOption) (*CrawlerMessage, error) StartCrawler(ctx context.Context, in *SourceIdMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) StopCrawler(ctx context.Context, in *SourceIdMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) }
CrawlerServiceClient is the client API for CrawlerService 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.
func NewCrawlerServiceClient ¶ added in v0.24.2
func NewCrawlerServiceClient(cc grpc.ClientConnInterface) CrawlerServiceClient
type CrawlerServiceServer ¶ added in v0.24.2
type CrawlerServiceServer interface { CreateCrawler(context.Context, *CrawlerMessage) (*emptypb.Empty, error) ListCrawler(context.Context, *SourceIdMessage) (*CrawlerMessage, error) StartCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error) StopCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error) // contains filtered or unexported methods }
CrawlerServiceServer is the server API for CrawlerService service. All implementations must embed UnimplementedCrawlerServiceServer for forward compatibility
type Enqueuer ¶
type Enqueuer struct { SourceId int32 `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` StartUrl string `protobuf:"bytes,2,opt,name=start_url,json=startUrl,proto3" json:"start_url,omitempty"` AllowedDomain []*AllowedDomain `protobuf:"bytes,3,rep,name=allowed_domain,json=allowedDomain,proto3" json:"allowed_domain,omitempty"` DurationInMinutes uint32 `protobuf:"varint,4,opt,name=duration_in_minutes,json=durationInMinutes,proto3" json:"duration_in_minutes,omitempty"` MaxDepth uint32 `protobuf:"varint,5,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"` Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=tickerscraper.v1.Status" json:"status,omitempty"` Rules []*Rule `protobuf:"bytes,7,rep,name=rules,proto3" json:"rules,omitempty"` Modified *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=modified,proto3" json:"modified,omitempty"` // contains filtered or unexported fields }
Deal: A deal is the reflection of the fact of a trade operation execution based on an order that contains a trade request
func (*Enqueuer) Descriptor
deprecated
func (*Enqueuer) GetAllowedDomain ¶
func (x *Enqueuer) GetAllowedDomain() []*AllowedDomain
func (*Enqueuer) GetDurationInMinutes ¶
func (*Enqueuer) GetMaxDepth ¶
func (*Enqueuer) GetModified ¶
func (x *Enqueuer) GetModified() *timestamppb.Timestamp
func (*Enqueuer) GetSourceId ¶
func (*Enqueuer) GetStartUrl ¶
func (*Enqueuer) ProtoMessage ¶
func (*Enqueuer) ProtoMessage()
func (*Enqueuer) ProtoReflect ¶
func (x *Enqueuer) ProtoReflect() protoreflect.Message
type Rule ¶
type Rule struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Action Action `protobuf:"varint,2,opt,name=action,proto3,enum=tickerscraper.v1.Action" json:"action,omitempty"` Selector string `protobuf:"bytes,3,opt,name=selector,proto3" json:"selector,omitempty"` Attribute string `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"` // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetAttribute ¶
func (*Rule) GetSelector ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type SourceIdMessage ¶
type SourceIdMessage struct { SourceId int32 `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` // contains filtered or unexported fields }
func (*SourceIdMessage) Descriptor
deprecated
func (*SourceIdMessage) Descriptor() ([]byte, []int)
Deprecated: Use SourceIdMessage.ProtoReflect.Descriptor instead.
func (*SourceIdMessage) GetSourceId ¶
func (x *SourceIdMessage) GetSourceId() int32
func (*SourceIdMessage) ProtoMessage ¶
func (*SourceIdMessage) ProtoMessage()
func (*SourceIdMessage) ProtoReflect ¶
func (x *SourceIdMessage) ProtoReflect() protoreflect.Message
func (*SourceIdMessage) Reset ¶
func (x *SourceIdMessage) Reset()
func (*SourceIdMessage) String ¶
func (x *SourceIdMessage) String() string
type Status ¶
type Status int32
const ( Status_STOPPED Status = 0 Status_STARTED Status = 1 )
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedCrawlerServiceServer ¶ added in v0.24.2
type UnimplementedCrawlerServiceServer struct { }
UnimplementedCrawlerServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCrawlerServiceServer) CreateCrawler ¶ added in v0.24.2
func (UnimplementedCrawlerServiceServer) CreateCrawler(context.Context, *CrawlerMessage) (*emptypb.Empty, error)
func (UnimplementedCrawlerServiceServer) ListCrawler ¶ added in v0.24.2
func (UnimplementedCrawlerServiceServer) ListCrawler(context.Context, *SourceIdMessage) (*CrawlerMessage, error)
func (UnimplementedCrawlerServiceServer) StartCrawler ¶ added in v0.24.2
func (UnimplementedCrawlerServiceServer) StartCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error)
func (UnimplementedCrawlerServiceServer) StopCrawler ¶ added in v0.24.2
func (UnimplementedCrawlerServiceServer) StopCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error)
type UnsafeCrawlerServiceServer ¶ added in v0.24.2
type UnsafeCrawlerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCrawlerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CrawlerServiceServer will result in compilation errors.