scheduler

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RetryLimit   = 5
	MaxQueueSize = 10 * 60 * 60 // 10 entries/second * 1h
)
View Source
const (
	MaxRetryTimeout = 3 * 24 * time.Hour
)

Variables

This section is empty.

Functions

func StartReporters

func StartReporters(session *Session)

Types

type PriorityEntry

type PriorityEntry struct {
	// contains filtered or unexported fields
}

queue //

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

reporter //

func NewReporter

func NewReporter(index int, session *Session) *Reporter

func (*Reporter) Run

func (r *Reporter) Run()

type RequestQueue

type RequestQueue struct {
	// contains filtered or unexported fields
}
var (
	Rqueue *RequestQueue
)

func (*RequestQueue) Delete

func (rq *RequestQueue) Delete(url string, data interface{}, priority int, due time.Time)

func (*RequestQueue) Patch

func (rq *RequestQueue) Patch(url string, data interface{}, priority int, due time.Time)

func (*RequestQueue) Post

func (rq *RequestQueue) Post(url string, data interface{}, priority int, due time.Time)

func (*RequestQueue) Put

func (rq *RequestQueue) Put(url string, data interface{}, priority int, due time.Time)

type Session

type Session struct {
	BaseURL       string
	Client        *http.Client
	Authorization string
}

func InitSession

func InitSession() *Session

func (*Session) CheckSession

func (session *Session) CheckSession(ctx context.Context) bool

func (*Session) Delete added in v1.3.0

func (session *Session) Delete(url string, rawBody interface{}, timeout time.Duration) ([]byte, int, error)

func (*Session) Get

func (session *Session) Get(url string, timeout time.Duration) ([]byte, int, error)

func (*Session) MultipartRequest

func (session *Session) MultipartRequest(url string, body bytes.Buffer, contentType string, timeout time.Duration) ([]byte, int, error)

func (*Session) Patch

func (session *Session) Patch(url string, rawBody interface{}, timeout time.Duration) ([]byte, int, error)

func (*Session) Post

func (session *Session) Post(url string, rawBody interface{}, timeout time.Duration) ([]byte, int, error)

func (*Session) Put

func (session *Session) Put(url string, rawBody interface{}, timeout time.Duration) ([]byte, int, error)

func (*Session) Request

func (session *Session) Request(method, url string, rawBody interface{}, timeout time.Duration) ([]byte, int, error)

Jump to

Keyboard shortcuts

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