wavefront

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadResponseStatus = errors.New("invalid response status code")

ErrBadResponseStatus will be returned when a response code doesn't match the API specification

Functions

func GetConcourseMetadata

func GetConcourseMetadata(event interface{}) (resource.Metadata, error)

GetConcourseMetadata will return the following key-value pairs:

key: name, value: <event name>
key: state, value: <event state>

func GetEventID

func GetEventID(event interface{}) (string, error)

GetEventID simply returns the ID of the event as specified in an event JSON block

Types

type APIClient

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

func NewAPIClient

func NewAPIClient(source resource.Source, client *http.Client) *APIClient

func (*APIClient) CreateInstantEvent

func (a *APIClient) CreateInstantEvent(name string, annotations map[string]string, tags []string) ([]byte, error)

func (*APIClient) EndOngoingEvent

func (a *APIClient) EndOngoingEvent(eventID string, eventJSON []byte, newAnnotations map[string]string) ([]byte, error)

func (*APIClient) GetEventJSON

func (a *APIClient) GetEventJSON(eventID string) ([]byte, error)

func (*APIClient) StartOngoingEvent

func (a *APIClient) StartOngoingEvent(name string, annotations map[string]string, tags []string) ([]byte, error)

type AuthRoundTripper

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

func (*AuthRoundTripper) GetDelegate

func (a *AuthRoundTripper) GetDelegate() http.RoundTripper

func (*AuthRoundTripper) RoundTrip

func (a *AuthRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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