config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindConfigPath

func FindConfigPath() (string, error)

FindConfigPath searches for the config file starting from current directory and traversing up parent directories until found or limits are reached

func FindProjectRoot

func FindProjectRoot() (string, error)

FindProjectRoot returns the directory containing ouroboros.json

func WriteConfig

func WriteConfig(config *OuroborosConfig) error

Types

type OuroborosConfig

type OuroborosConfig struct {
	Programs             []Program `json:"programs"`
	CompileArgs          []string  `json:"compile_args"`
	ProgramMap           string    `json:"program_map,omitempty"`
	ProgramMapMaxEntries uint32    `json:"program_map_max_entries,omitempty"`
	ProgramPrefix        string    `json:"program_prefix,omitempty"`
	BpfBaseDir           string    `json:"bpf_base_dir,omitempty"`
}

func ReadConfig

func ReadConfig() (*OuroborosConfig, error)

func (*OuroborosConfig) GetBpfBaseDir

func (c *OuroborosConfig) GetBpfBaseDir() string

func (*OuroborosConfig) GetMainProgram

func (c *OuroborosConfig) GetMainProgram() *Program

func (*OuroborosConfig) GetMapOptions

func (c *OuroborosConfig) GetMapOptions() ebpf.MapOptions

func (*OuroborosConfig) GetProgramMap

func (c *OuroborosConfig) GetProgramMap() string

func (*OuroborosConfig) GetProgramMapMaxEntries added in v0.1.1

func (c *OuroborosConfig) GetProgramMapMaxEntries() uint32

type Program

type Program struct {
	Name       string           `json:"name"`
	ID         int              `json:"id"`
	IsMain     bool             `json:"is_main,omitempty"`
	Metadata   *ProgramMetadata `json:"metadata,omitempty"`
	Entrypoint string           `json:"entrypoint,omitempty"`
}

type ProgramMetadata

type ProgramMetadata struct {
	HiddenOnFlow bool `json:"hidden_on_flow,omitempty"`
}

type SharedMapConfig

type SharedMapConfig struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	KeySize    uint32 `json:"key_size"`
	ValueSize  uint32 `json:"value_size"`
	MaxEntries uint32 `json:"max_entries"`
	Comment    string `json:"comment,omitempty"`
}

Jump to

Keyboard shortcuts

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