services

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminService

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

AdminService is a client for interacting with the admin service

func NewAdminService

func NewAdminService(l log.Logger, addr string, serviceToken string) (AdminService, error)

NewAdminService creates an AdminClient

func (AdminService) PageAPIKeys

func (r AdminService) PageAPIKeys(ctx context.Context, input PageAPIKeysInput) (PageAPIKeysResult, error)

PageAPIKeys is used to fetch environment info from the admin services /admin/apikey endpoint

func (AdminService) PageTargets

func (r AdminService) PageTargets(ctx context.Context, input PageTargetsInput) (PageTargetsResult, error)

PageTargets is used for synchronously paging over projects by making requests to the admin services /admin/targets endpoint.

type ClientService

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

ClientService is a type for interacting with the Feature Flag Client Service

func NewClientService

func NewClientService(l log.Logger, addr string) (ClientService, error)

NewClientService creates a ClientService

func (ClientService) Authenticate

func (c ClientService) Authenticate(ctx context.Context, apiKey string, target domain.Target) (string, error)

Authenticate makes an authentication request to the client service

type MetricService

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

MetricService is a type for interacting with the Feature Flag Metric Service

func NewMetricService

func NewMetricService(l log.Logger, addr string, accountID string, tokens map[string]string, enabled bool, reg *prometheus.Registry) (MetricService, error)

NewMetricService creates a MetricService

func (MetricService) SendMetrics

func (m MetricService) SendMetrics(ctx context.Context, clusterIdentifier string)

SendMetrics forwards stored metrics to the SaaS platform

func (MetricService) StoreMetrics

func (m MetricService) StoreMetrics(ctx context.Context, req domain.MetricsRequest) error

StoreMetrics aggregates and stores metrics

type PageAPIKeysInput

type PageAPIKeysInput struct {
	AccountIdentifier     string
	OrgIdentifier         string
	ProjectIdentifier     string
	EnvironmentIdentifier string
	PageNumber            int
	PageSize              int
}

PageAPIKeysInput contains the parameters required to make a GetEnvironments request

type PageAPIKeysResult

type PageAPIKeysResult struct {
	APIKeys  []admingen.ApiKey
	Finished bool
}

PageAPIKeysResult contains the parameters required to make a PageAPIKeys request

type PageTargetsInput

type PageTargetsInput struct {
	AccountIdentifier     string
	OrgIdentifier         string
	ProjectIdentifier     string
	EnvironmentIdentifier string
	PageNumber            int
	PageSize              int
}

PageTargetsInput contains the parameters required to make a PageTargets request

type PageTargetsResult

type PageTargetsResult struct {
	Targets  []admingen.Target
	Finished bool
}

PageTargetsResult contains the parameters required to make a PageTargets request

Jump to

Keyboard shortcuts

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