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: 0

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