client

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options func(*webhook.WebhookReview)

Options defines a func whose parameter is WebhookReview

type WebhookClient

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

WebhookClient defines webhook client to query custom servers

func NewWebhookClient

func NewWebhookClient(config *carrierv1.Configurations, name, status string) *WebhookClient

NewWebhookClient creates a new client

func (*WebhookClient) Check

Check checks the response

func (*WebhookClient) Name

func (s *WebhookClient) Name() string

Name return webhook name

func (*WebhookClient) Period

func (s *WebhookClient) Period() time.Duration

Period return request period

func (*WebhookClient) Push

Push informs the webhook about constraints.

func (*WebhookClient) Request

func (s *WebhookClient) Request(gs *carrierv1.GameServer, options ...Options) (*webhook.WebhookResponse, error)

Request send request to the custom webhook

Jump to

Keyboard shortcuts

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