Documentation
¶
Overview ¶
Package utclient pkg/utclient/client.go c2-net-discovery
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface {
UpdateVisorUptime(context.Context, string) error
FetchUptimes(context.Context, string) ([]byte, error)
}
APIClient implements uptime tracker API client.
func NewHTTP ¶
func NewHTTP(addr string, pk cipher.PubKey, sk cipher.SecKey, httpC *http.Client, clientPublicIP string, mLogger *logging.MasterLogger) (APIClient, error)
NewHTTP creates a new client setting a public key to the client to be used for auth. When keys are set, the client will sign request before submitting. The signature information is transmitted in the header using: * SW-Public: The specified public key * SW-Nonce: The nonce for that public key * SW-Sig: The signature of the payload + the nonce
Click to show internal directories.
Click to hide internal directories.