Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseURL ¶
pulled from lib/pq ParseURL no longer needs to be used by clients of this library since supplying a URL as a connection string to sql.Open() is now supported:
sql.Open("postgres", "postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full")
It remains exported here for backwards-compatibility.
ParseURL converts a url to a connection string for driver.Open. Example:
"postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full"
converts to:
"user=bob password=secret host=1.2.3.4 port=5432 dbname=mydb sslmode=verify-full"
A minimal example:
"postgres://"
This will be blank, causing driver.Open to use all of the defaults
Types ¶
type Postgresql ¶
type Postgresql struct { Address string Databases []string IgnoredDatabases []string OrderedColumns []string AllColumns []string // contains filtered or unexported fields }
func (*Postgresql) Description ¶
func (p *Postgresql) Description() string
func (*Postgresql) Gather ¶
func (p *Postgresql) Gather(acc telegraf.Accumulator) error
func (*Postgresql) IgnoredColumns ¶
func (p *Postgresql) IgnoredColumns() map[string]bool
func (*Postgresql) SampleConfig ¶
func (p *Postgresql) SampleConfig() string
func (*Postgresql) SanitizedAddress ¶
func (p *Postgresql) SanitizedAddress() (_ string, err error)
Click to show internal directories.
Click to hide internal directories.