Versions in this module Expand all Collapse all v0 v0.1.1 Apr 13, 2020 Changes in this version + var DefaultClient = &Client + var ErrCancelled error = errors.New("operation cancelled") + var ErrCannotAccess error = errors.New("cannot access any URLs") + var ErrInvalidID error = errors.New("invalid server ID") + var ErrParse error = errors.New("response parse error") + var ErrPingFailure error = errors.New("ping response failure") + var ErrTimeout error = errors.New("operation timed out") + var ErrUnknownCommand error = errors.New("unknown command") + var ErrUnknownServerType error = errors.New("unknown server type") + func Resolve(ctx context.Context, id string) ([]string, error) + type Client struct + Client *http.Client + Timeout time.Duration + func (c Client) GetInfo(ctx context.Context, id string) (Info, error) + func (c Client) Ping(ctx context.Context, url string) (string, error) + func (c Client) Resolve(ctx context.Context, id string) ([]string, error) + func (c Client) UpdateState(ctx context.Context, info *Info) error + type ConnState uint8 + const StateConnectFailed + const StateInvalidServer + const StateOK + const StateUnknown + type Info struct + Records []Record + ServerID string + type Record struct + State ConnState + Type uint8 + URL string