heartbeat

package
v0.0.0-...-d330e10 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 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 {
	abstract.AbstractClient
	SendPulse(sessionID int) error
}

Client is an interface that contains an AbstractClient and a SendPulse method

func NewClient

func NewClient(config urlfinder.ClientConfig) Client

NewClient is a function that returns a new Client

func NewClientWithBasicAuth

func NewClientWithBasicAuth(username, password string, config urlfinder.ClientConfig) (Client, error)

NewClientWithBasicAuth is a function that returns a new Client using basic auth for the platform client

type MockClient

type MockClient struct {
	abstract_client.MockAbstractClient
	NumCalledPulse int
	PulseError     error
}

func (*MockClient) SendPulse

func (m *MockClient) SendPulse(sessionID int) error

SendPulse is a method that increments the number of times it was called and returns an error if PulseError is not nil

type Pulse

type Pulse struct {
	SessionID int `json:"sessionId"`
}

Pulse is a struct that represents a pulse sent to the heartbeat service.

Jump to

Keyboard shortcuts

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