postgres

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package postgres implements "postgres" surfacer. This surfacer type is in experimental phase right now.

To use this surfacer, add a stanza similar to the following to your cloudprober config:

surfacer {
  type: POSTGRES
	postgres_surfacer {
	  connection_string: "postgresql://root:root@localhost/cloudprober?sslmode=disable"
	  metrics_table_name: "metrics"
  }
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Surfacer

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

Surfacer structures for writing to postgres.

func New

func New(ctx context.Context, config *configpb.SurfacerConf, l *logger.Logger) (*Surfacer, error)

New initializes a Postgres surfacer. Postgres surfacer inserts probe results into a postgres database.

func (*Surfacer) Write

func (s *Surfacer) Write(ctx context.Context, em *metrics.EventMetrics)

Write takes the data to be written

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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