serviceconfig

package
v0.0.0-...-32f485c Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SmRetryConfigs = map[int]util.RetryConfig{
	http.StatusTooManyRequests: util.RetryConfig{
		RetryNum:      30,
		RetryInterval: time.Second * 10,
	},
}

Functions

This section is empty.

Types

type RolloutIdChangeDetector

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

func NewRolloutIdChangeDetector

func NewRolloutIdChangeDetector(client *http.Client, serviceControlUrl, serviceName string,
	accessToken util.GetAccessTokenFunc) *RolloutIdChangeDetector

func (*RolloutIdChangeDetector) SetDetectRolloutIdChangeTimer

func (c *RolloutIdChangeDetector) SetDetectRolloutIdChangeTimer(interval time.Duration, callback func())

type ServiceConfigFetcher

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

func NewServiceConfigFetcher

func NewServiceConfigFetcher(client *http.Client, serviceManagementUrl,
	serviceName string, accessToken util.GetAccessTokenFunc) *ServiceConfigFetcher

func (*ServiceConfigFetcher) FetchConfig

func (s *ServiceConfigFetcher) FetchConfig(configId string) (*confpb.Service, error)

Fetch the service config by given configId.

func (*ServiceConfigFetcher) LoadConfigIdFromRollouts

func (s *ServiceConfigFetcher) LoadConfigIdFromRollouts() (string, error)

Fetch all the rollouts and use the latest success rollout. Among its all service configs, pick up the one with highest traffic percentage.

Jump to

Keyboard shortcuts

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