monitoring

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Next

func Next(records interface{ Next() (bool, error) }) bool

Next is helper function that simplifies the usage of the iterator.

Types

type Client

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

Client for the monitoring.

func New

func New(provider storage.Provider, vcStore vcStore, opts ...Opt) (*Client, error)

New returns monitoring client.

func (*Client) Close

func (c *Client) Close()

Close stops ticker.

func (*Client) Watch

func (c *Client) Watch(anchorCredID string, endTime time.Time, proof []byte) error

Watch starts monitoring.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient represents HTTP client.

type Opt

type Opt func(*Client)

Opt represents client option func.

func WithHTTPClient

func WithHTTPClient(client HTTPClient) Opt

WithHTTPClient allows providing HTTP client.

type Proof

type Proof struct {
	Data struct {
		Domain  string    `json:"domain"`
		Created time.Time `json:"created"`
	} `json:"proof"`
}

Proof represents response.

Jump to

Keyboard shortcuts

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