pingdom

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WEBHOOK string = "webhook"
	LIBRATO string = "librato"
)

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

func String

func String(s string) int

String hashes a string to a unique hashcode.

crc32 returns a uint32, but for our use we need and non negative integer. Here we cast to an integer and invert it if the result is negative.

func Strings

func Strings(strings []string) string

Strings hashes a list of strings to a unique hashcode.

Types

type Clients

type Clients struct {
	Pingdom    *pingdom.Client
	PingdomExt *pingdomext.Client
}

type Config

type Config struct {
	APIToken           string `mapstructure:"api_token"`
	SolarwindsUser     string `mapstructure:"solarwinds_user"`
	SolarwindsPassword string `mapstructure:"solarwinds_passwd"`
	SolarwindsOrgID    string `mapstructure:"solarwinds_org_id"`
}

Config respresents the client configuration

func (*Config) Client

func (c *Config) Client() (*Clients, error)

type OccurrenceGroup

type OccurrenceGroup pingdom.ListOccurrenceQuery

func NewOccurrenceGroupWithResourceData

func NewOccurrenceGroupWithResourceData(d *schema.ResourceData) (*OccurrenceGroup, error)

func (*OccurrenceGroup) Delete

func (g *OccurrenceGroup) Delete(client *pingdom.Client) error

func (*OccurrenceGroup) ID

func (g *OccurrenceGroup) ID() string

ID returns unique id for an OccurrenceGroup. An OccurrenceGroup is essentially a query against Maintenance Occurrence. The result of query can overlap, so there is no unique resource id for queries on the Pingdom side.

func (*OccurrenceGroup) List

func (g *OccurrenceGroup) List(client *pingdom.Client) ([]pingdom.Occurrence, error)

func (*OccurrenceGroup) MustExists

func (g *OccurrenceGroup) MustExists(client *pingdom.Client) error

func (*OccurrenceGroup) Populate

func (g *OccurrenceGroup) Populate(client *pingdom.Client, d *schema.ResourceData) error

func (*OccurrenceGroup) Sample

func (g *OccurrenceGroup) Sample(client *pingdom.Client) (*pingdom.Occurrence, int, error)

func (*OccurrenceGroup) Size

func (g *OccurrenceGroup) Size(client *pingdom.Client) (int, error)

func (*OccurrenceGroup) Update

func (g *OccurrenceGroup) Update(client *pingdom.Client, from int64, to int64) error

Jump to

Keyboard shortcuts

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