client

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package client contains implementation for maestro client

Package client contains implementation for maestro client

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoActionableVersion is returned when there is no actionable version for
	// a given application and segment
	ErrNoActionableVersion = fmt.Errorf("no actionable version found")
)

Error definitions

Functions

This section is empty.

Types

type HTTPConfig

type HTTPConfig struct {
	BaseURI   string
	Secret    cfg.SecretData
	Requester string
}

HTTPConfig configures the http request

type MaestroClient

type MaestroClient struct {
	BaseURI   string
	APIToken  cfg.SecretData
	Requestor string
}

func NewMaestroClient

func NewMaestroClient(config *HTTPConfig) MaestroClient

func (*MaestroClient) FetchActionable

func (c *MaestroClient) FetchActionable(applicationName, segmentName string) (*Version, error)

FetchActionable returns the version

type Version

type Version struct {
	// ID is the DB id of the version
	ID uint64 `json:"id,omitempty"`
	// DeploymentSegmentID is the ID of the segment name
	DeploymentSegmentID int32 `json:"deploymentSegmentId,omitempty"`
	// Version is the actionable version for a segment name
	Version string `json:"version,omitempty"`
	// ActionableAt is the time the Version was set
	ActionableAt time.Time `json:"actionableAt,omitempty"`
}

Version is the struct payload returned from maestro actionableVersion

Jump to

Keyboard shortcuts

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