tootles

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package tootles is the code for serving metadata (ec2 style, etc). Useful for Cloud-init integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BackendEc2       ec2.Client
	BackendHack      hack.Client
	DebugMode        bool
	InstanceEndpoint bool
}

func NewConfig

func NewConfig(c Config) *Config

func (*Config) EC2MetadataHandler added in v0.23.0

func (c *Config) EC2MetadataHandler() http.Handler

EC2MetadataHandler returns an http.Handler that serves EC2-style metadata at /2009-04-04/... and optionally /tootles/instanceID/:instanceID/2009-04-04/...

func (*Config) HackMetadataHandler added in v0.23.0

func (c *Config) HackMetadataHandler() http.Handler

HackMetadataHandler returns an http.Handler that serves the /metadata endpoint for the rootio hub action.

func (*Config) SetBackendFromFilterer added in v0.23.0

func (c *Config) SetBackendFromFilterer(filterer HardwareFilterer)

SetBackendFromFilterer configures BackendEc2 and BackendHack from a HardwareFilterer. This allows callers to wire a backend without importing tootles internal packages.

type HardwareFilterer added in v0.23.0

type HardwareFilterer interface {
	FilterHardware(ctx context.Context, opts data.HardwareFilter) (*v1alpha1.Hardware, error)
}

HardwareFilterer is the interface required to filter Hardware objects. It is implemented by the kube and noop backends.

Directories

Path Synopsis
internal
backend
Package backend provides tootles-specific backend logic for converting Hardware resources into EC2 and Hack instance metadata formats.
Package backend provides tootles-specific backend logic for converting Hardware resources into EC2 and Hack instance metadata formats.
frontend/ec2/internal/staticroute
Package staticroute provides tools for building EC2 Instance Metadata static routes from the set of data endpoints.
Package staticroute provides tools for building EC2 Instance Metadata static routes from the set of data endpoints.
frontend/hack
Package hack contains a frontend that provides a /metadata endpoint for the rootio hub action.
Package hack contains a frontend that provides a /metadata endpoint for the rootio hub action.

Jump to

Keyboard shortcuts

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