http

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 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) (*http.Response, error)
}

Client defines the behaviour required of a http client

type Cron

type Cron interface {
	AddFunc(spec string, cmd func()) error
	Start()
	Stop()
}

Cron defines the behaviour required of a cron

type Sync

type Sync struct {
	URI         string
	Client      Client
	Cron        Cron
	LastBodySHA string
	Logger      *logger.Logger
	BearerToken string
	AuthHeader  string
	Interval    uint32
	// contains filtered or unexported fields
}

func (*Sync) Fetch

func (hs *Sync) Fetch(ctx context.Context) (string, error)

func (*Sync) Init

func (hs *Sync) Init(_ context.Context) error

func (*Sync) IsReady

func (hs *Sync) IsReady() bool

func (*Sync) ReSync

func (hs *Sync) ReSync(ctx context.Context, dataSync chan<- sync.DataSync) error

func (*Sync) Sync

func (hs *Sync) Sync(ctx context.Context, dataSync chan<- sync.DataSync) error

Directories

Path Synopsis
Package syncmock is a generated GoMock package.
Package syncmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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