concept

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(req *http.Request) (resp *http.Response, err error)
}

type Inquirer

type Inquirer interface {
	Inquire(candidates []string, tid string) []*Worker
}

type NeoInquirer

type NeoInquirer struct {
	Neo db.Service
	Log *logger.UPPLogger
}

func NewNeoInquirer

func NewNeoInquirer(neo db.Service, log *logger.UPPLogger) *NeoInquirer

func (*NeoInquirer) Inquire

func (n *NeoInquirer) Inquire(candidates []string, tid string) []*Worker

type S3Updater

type S3Updater struct {
	Client            Client
	S3WriterBaseURL   string
	S3WriterHealthURL string
}

func (*S3Updater) CheckHealth

func (u *S3Updater) CheckHealth(client Client) (string, error)

func (*S3Updater) Upload

func (u *S3Updater) Upload(concept []byte, fileName, tid string) error

type State

type State string
const (
	STARTING State = "Starting"
	RUNNING  State = "Running"
	FINISHED State = "Finished"
)

type Updater

type Updater interface {
	Upload(concept []byte, conceptType, tid string) error
}

type Worker

type Worker struct {
	sync.RWMutex
	ConceptCh    chan db.Concept `json:"-"`
	Errch        chan error      `json:"-"`
	ConceptType  string          `json:"ConceptType,omitempty"`
	Count        int             `json:"Count,omitempty"`
	Progress     int             `json:"Progress,omitempty"`
	Status       State           `json:"Status,omitempty"`
	ErrorMessage string          `json:"ErrorMessage,omitempty"`
}

func (*Worker) GetCount

func (w *Worker) GetCount() int

Jump to

Keyboard shortcuts

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