transaction

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigTransaction

type ConfigTransaction struct {
	Username string
	Password string
	BaseURL  string
	SSL      bool
}

Config defines variable for haproxy configuration

func (*ConfigTransaction) Transaction

func (c *ConfigTransaction) Transaction(fn func(transactionID string) (*http.Response, error)) (*http.Response, error)

Transaction encapsulate function to ensure that it's executed within a locked context

func (*ConfigTransaction) TransactionWithData

func (c *ConfigTransaction) TransactionWithData(fn func(transactionID string) (*http.Response, []byte, error)) (*http.Response, []byte, error)

Transaction encapsulate function to ensure that it's executed within a locked context and return body

type TransactionResponse

type TransactionResponse struct {
	Version int    `json:"_version"`
	ID      string `json:"id"`
	Status  string `json:"status"`
}

TransactionResponse get response when Transaction create

Jump to

Keyboard shortcuts

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