Documentation ¶
Overview ¶
Package Client
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client config
func Configure ¶
Configure client
Example ¶
package main import ( "github.com/fgouteroux/prom-push-cli/pkg/client" ) func main() { // Configure the client promClient := client.Configure( "http://my-remote-write:10001/api/v1/push", false, 10, make([]string), ) }
Output:
func ConfigureWithInsecureTLS ¶
func ConfigureWithInsecureTLS(url string, enableHTTP2, debug bool, timeout int, headers []string) *Client
Configure client with insecure SSL
Example ¶
package main import ( "github.com/fgouteroux/prom-push-cli/pkg/client" ) func main() { // Configure the client promClient := client.ConfigureWithInsecureTLS( "https://my-remote-write:10001/api/v1/push", false, false, 10, make([]string), ) }
Output:
func ConfigureWithTLS ¶
func ConfigureWithTLS(url string, caFile string, keyFile, certFile string, enableHTTP2, insecure bool, debug bool, timeout int, headers []string) *Client
Configure client with SSL
Example ¶
package main import ( "github.com/fgouteroux/prom-push-cli/pkg/client" ) func main() { // Configure the client with TLS setting promClient := client.Configure( "http://my-remote-write:10001/api/v1/push", "/tmp/caFile", "/tmp/keyFile", "/tmp/certFile", false, false, false, 10, make([]string), ) }
Output:
func (Client) Push ¶
func (client Client) Push(wr *prompb.WriteRequest) error
Push timeseries to a remote write url
func (Client) PushWithRetries ¶
func (client Client) PushWithRetries(wr *prompb.WriteRequest) error
Push with retries timeseries to a remote write url
Click to show internal directories.
Click to hide internal directories.