pd

package
v0.0.0-...-47e18b9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNS = errorx.NewNamespace("error.pd")
)
View Source
var (
	ErrPDClientRequestFailed = ErrNS.NewType("client_request_failed")
)

Functions

func NewEtcdClient

func NewEtcdClient(lc fx.Lifecycle, config *config.Config) (*clientv3.Client, error)

Types

type Client

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

func NewPDClient

func NewPDClient(lc fx.Lifecycle, httpClient *httpc.Client, config *config.Config) *Client

func (*Client) SendGetRequest

func (c *Client) SendGetRequest(path string) ([]byte, error)

func (*Client) SendPostRequest

func (c *Client) SendPostRequest(path string, body io.Reader) ([]byte, error)

func (*Client) WithBaseURL

func (c *Client) WithBaseURL(baseURL string) *Client

Jump to

Keyboard shortcuts

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