inputs

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullName

func FullName(input Input) string

func Serve

func Serve(ctx context.Context, input Input) error

Types

type Config added in v0.1.0

type Config struct {
	// ExporterConfig Exporterの設定
	ExporterConfig *config.ExporterConfig `yaml:"exporter_config"`
}

Config Inputsのエクスポーター関連動作設定

func LoadConfigFromPath added in v0.1.0

func LoadConfigFromPath(path string) (*Config, error)

LoadConfigFromPath 指定のパスからConfigをロードする

type Input

type Input interface {
	Name() string
	Version() string
	ShouldAccept(req *http.Request) (bool, error) // true,nilを返した場合のみCoreへのリクエストを行う
	Destination() string
	ListenAddress() string
	ConfigPath() string
	GetLogger() *slog.Logger
}

Input Webhookを受け取りCoreへのリクエストを行うInputsが備えるべきインターフェース

type ScalingRequest

type ScalingRequest struct {
	Source           string `name:"source" validate:"omitempty,printascii,max=1024"`
	ResourceName     string `name:"resource-name" validate:"omitempty,printascii,max=1024"`
	RequestType      string `name:"request-type" validate:"required,oneof=up down"`
	DesiredStateName string `name:"desired-state-name" validate:"omitempty,printascii,max=1024"`
}

ScalingRequest Inputsからのリクエストを表す

func (*ScalingRequest) Validate

func (r *ScalingRequest) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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