controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RunStatus_name = map[int32]string{
		0: "RUNNING",
		1: "PAUSED",
		2: "PAUSE_REQUESTED",
	}
	RunStatus_value = map[string]int32{
		"RUNNING":         0,
		"PAUSED":          1,
		"PAUSE_REQUESTED": 2,
	}
)

Enum value maps for RunStatus.

View Source
var Controller_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "veidemann.api.controller.v1.Controller",
	HandlerType: (*ControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRolesForActiveUser",
			Handler:    _Controller_GetRolesForActiveUser_Handler,
		},
		{
			MethodName: "RunCrawl",
			Handler:    _Controller_RunCrawl_Handler,
		},
		{
			MethodName: "AbortCrawlExecution",
			Handler:    _Controller_AbortCrawlExecution_Handler,
		},
		{
			MethodName: "AbortJobExecution",
			Handler:    _Controller_AbortJobExecution_Handler,
		},
		{
			MethodName: "GetOpenIdConnectIssuer",
			Handler:    _Controller_GetOpenIdConnectIssuer_Handler,
		},
		{
			MethodName: "PauseCrawler",
			Handler:    _Controller_PauseCrawler_Handler,
		},
		{
			MethodName: "UnPauseCrawler",
			Handler:    _Controller_UnPauseCrawler_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Controller_Status_Handler,
		},
		{
			MethodName: "QueueCountForCrawlExecution",
			Handler:    _Controller_QueueCountForCrawlExecution_Handler,
		},
		{
			MethodName: "QueueCountForCrawlHostGroup",
			Handler:    _Controller_QueueCountForCrawlHostGroup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller/v1/controller.proto",
}

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

View Source
var File_controller_v1_controller_proto protoreflect.FileDescriptor
View Source
var File_controller_v1_resources_proto protoreflect.FileDescriptor

Functions

func RegisterControllerServer

func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer)

Types

type ControllerClient

type ControllerClient interface {
	GetRolesForActiveUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RoleList, error)
	RunCrawl(ctx context.Context, in *RunCrawlRequest, opts ...grpc.CallOption) (*RunCrawlReply, error)
	// Abort a crawl execution
	AbortCrawlExecution(ctx context.Context, in *ExecutionId, opts ...grpc.CallOption) (*v1.CrawlExecutionStatus, error)
	// Abort a job execution
	AbortJobExecution(ctx context.Context, in *ExecutionId, opts ...grpc.CallOption) (*v1.JobExecutionStatus, error)
	// Get the configured OpenID connect issuer address
	GetOpenIdConnectIssuer(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OpenIdConnectIssuerReply, error)
	PauseCrawler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UnPauseCrawler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CrawlerStatus, error)
	// Number of queued URI's for a CrawlExecution
	QueueCountForCrawlExecution(ctx context.Context, in *v1.CrawlExecutionId, opts ...grpc.CallOption) (*v1.CountResponse, error)
	// Number of queued URI's for a CrawlHostGroup
	QueueCountForCrawlHostGroup(ctx context.Context, in *v1.CrawlHostGroup, opts ...grpc.CallOption) (*v1.CountResponse, error)
}

ControllerClient is the client API for Controller 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 NewControllerClient

func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient

type ControllerServer

type ControllerServer interface {
	GetRolesForActiveUser(context.Context, *emptypb.Empty) (*RoleList, error)
	RunCrawl(context.Context, *RunCrawlRequest) (*RunCrawlReply, error)
	// Abort a crawl execution
	AbortCrawlExecution(context.Context, *ExecutionId) (*v1.CrawlExecutionStatus, error)
	// Abort a job execution
	AbortJobExecution(context.Context, *ExecutionId) (*v1.JobExecutionStatus, error)
	// Get the configured OpenID connect issuer address
	GetOpenIdConnectIssuer(context.Context, *emptypb.Empty) (*OpenIdConnectIssuerReply, error)
	PauseCrawler(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	UnPauseCrawler(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Status(context.Context, *emptypb.Empty) (*CrawlerStatus, error)
	// Number of queued URI's for a CrawlExecution
	QueueCountForCrawlExecution(context.Context, *v1.CrawlExecutionId) (*v1.CountResponse, error)
	// Number of queued URI's for a CrawlHostGroup
	QueueCountForCrawlHostGroup(context.Context, *v1.CrawlHostGroup) (*v1.CountResponse, error)
	// contains filtered or unexported methods
}

ControllerServer is the server API for Controller service. All implementations must embed UnimplementedControllerServer for forward compatibility

type CrawlerStatus

type CrawlerStatus struct {
	RunStatus RunStatus `protobuf:"varint,1,opt,name=runStatus,proto3,enum=veidemann.api.controller.v1.RunStatus" json:"runStatus,omitempty"`
	// The number of busy CrawlHostGroups which essentially is the number of web pages currently downloading
	BusyCrawlHostGroupCount int64 `protobuf:"varint,2,opt,name=busyCrawlHostGroupCount,proto3" json:"busyCrawlHostGroupCount,omitempty"`
	// Total number of queued URI's
	QueueSize int64 `protobuf:"varint,3,opt,name=queueSize,proto3" json:"queueSize,omitempty"`
	// contains filtered or unexported fields
}

func (*CrawlerStatus) Descriptor deprecated

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

Deprecated: Use CrawlerStatus.ProtoReflect.Descriptor instead.

func (*CrawlerStatus) GetBusyCrawlHostGroupCount

func (x *CrawlerStatus) GetBusyCrawlHostGroupCount() int64

func (*CrawlerStatus) GetQueueSize

func (x *CrawlerStatus) GetQueueSize() int64

func (*CrawlerStatus) GetRunStatus

func (x *CrawlerStatus) GetRunStatus() RunStatus

func (*CrawlerStatus) ProtoMessage

func (*CrawlerStatus) ProtoMessage()

func (*CrawlerStatus) ProtoReflect

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

func (*CrawlerStatus) Reset

func (x *CrawlerStatus) Reset()

func (*CrawlerStatus) String

func (x *CrawlerStatus) String() string

type ExecutionId

type ExecutionId struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Request for getting an execution by id

func (*ExecutionId) Descriptor deprecated

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

Deprecated: Use ExecutionId.ProtoReflect.Descriptor instead.

func (*ExecutionId) GetId

func (x *ExecutionId) GetId() string

func (*ExecutionId) ProtoMessage

func (*ExecutionId) ProtoMessage()

func (*ExecutionId) ProtoReflect

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

func (*ExecutionId) Reset

func (x *ExecutionId) Reset()

func (*ExecutionId) String

func (x *ExecutionId) String() string

type OpenIdConnectIssuerReply

type OpenIdConnectIssuerReply struct {
	OpenIdConnectIssuer string `protobuf:"bytes,1,opt,name=open_id_connect_issuer,json=openIdConnectIssuer,proto3" json:"open_id_connect_issuer,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenIdConnectIssuerReply) Descriptor deprecated

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

Deprecated: Use OpenIdConnectIssuerReply.ProtoReflect.Descriptor instead.

func (*OpenIdConnectIssuerReply) GetOpenIdConnectIssuer

func (x *OpenIdConnectIssuerReply) GetOpenIdConnectIssuer() string

func (*OpenIdConnectIssuerReply) ProtoMessage

func (*OpenIdConnectIssuerReply) ProtoMessage()

func (*OpenIdConnectIssuerReply) ProtoReflect

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

func (*OpenIdConnectIssuerReply) Reset

func (x *OpenIdConnectIssuerReply) Reset()

func (*OpenIdConnectIssuerReply) String

func (x *OpenIdConnectIssuerReply) String() string

type RoleList

type RoleList struct {
	Role []v1.Role `protobuf:"varint,1,rep,packed,name=role,proto3,enum=veidemann.api.config.v1.Role" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleList) Descriptor deprecated

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

Deprecated: Use RoleList.ProtoReflect.Descriptor instead.

func (*RoleList) GetRole

func (x *RoleList) GetRole() []v1.Role

func (*RoleList) ProtoMessage

func (*RoleList) ProtoMessage()

func (*RoleList) ProtoReflect

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

func (*RoleList) Reset

func (x *RoleList) Reset()

func (*RoleList) String

func (x *RoleList) String() string

type RunCrawlReply

type RunCrawlReply struct {
	JobExecutionId string `protobuf:"bytes,1,opt,name=job_execution_id,json=jobExecutionId,proto3" json:"job_execution_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RunCrawlReply) Descriptor deprecated

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

Deprecated: Use RunCrawlReply.ProtoReflect.Descriptor instead.

func (*RunCrawlReply) GetJobExecutionId

func (x *RunCrawlReply) GetJobExecutionId() string

func (*RunCrawlReply) ProtoMessage

func (*RunCrawlReply) ProtoMessage()

func (*RunCrawlReply) ProtoReflect

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

func (*RunCrawlReply) Reset

func (x *RunCrawlReply) Reset()

func (*RunCrawlReply) String

func (x *RunCrawlReply) String() string

type RunCrawlRequest

type RunCrawlRequest struct {
	JobId string `protobuf:"bytes,5,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// If seed id is submitted, only this seed will be harvested.
	// If empty, all seeds configured with the submitted job id will be harvested.
	SeedId string `protobuf:"bytes,6,opt,name=seed_id,json=seedId,proto3" json:"seed_id,omitempty"`
	// contains filtered or unexported fields
}

Kick of a crawl job immediately If a job is already running for this job_id, then new seeds are added to the job instead of starting a new one.

func (*RunCrawlRequest) Descriptor deprecated

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

Deprecated: Use RunCrawlRequest.ProtoReflect.Descriptor instead.

func (*RunCrawlRequest) GetJobId

func (x *RunCrawlRequest) GetJobId() string

func (*RunCrawlRequest) GetSeedId

func (x *RunCrawlRequest) GetSeedId() string

func (*RunCrawlRequest) ProtoMessage

func (*RunCrawlRequest) ProtoMessage()

func (*RunCrawlRequest) ProtoReflect

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

func (*RunCrawlRequest) Reset

func (x *RunCrawlRequest) Reset()

func (*RunCrawlRequest) String

func (x *RunCrawlRequest) String() string

type RunStatus

type RunStatus int32
const (
	RunStatus_RUNNING         RunStatus = 0
	RunStatus_PAUSED          RunStatus = 1
	RunStatus_PAUSE_REQUESTED RunStatus = 2
)

func (RunStatus) Descriptor

func (RunStatus) Descriptor() protoreflect.EnumDescriptor

func (RunStatus) Enum

func (x RunStatus) Enum() *RunStatus

func (RunStatus) EnumDescriptor deprecated

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

Deprecated: Use RunStatus.Descriptor instead.

func (RunStatus) Number

func (x RunStatus) Number() protoreflect.EnumNumber

func (RunStatus) String

func (x RunStatus) String() string

func (RunStatus) Type

type UnimplementedControllerServer

type UnimplementedControllerServer struct {
}

UnimplementedControllerServer must be embedded to have forward compatible implementations.

func (UnimplementedControllerServer) AbortCrawlExecution

func (UnimplementedControllerServer) AbortJobExecution

func (UnimplementedControllerServer) GetOpenIdConnectIssuer

func (UnimplementedControllerServer) GetRolesForActiveUser

func (UnimplementedControllerServer) PauseCrawler

func (UnimplementedControllerServer) QueueCountForCrawlExecution

func (UnimplementedControllerServer) QueueCountForCrawlHostGroup

func (UnimplementedControllerServer) RunCrawl

func (UnimplementedControllerServer) Status

func (UnimplementedControllerServer) UnPauseCrawler

type UnsafeControllerServer

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

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

Jump to

Keyboard shortcuts

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