exampleapi

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "example-api"

Variables

This section is empty.

Functions

This section is empty.

Types

type ExampleAPI

type ExampleAPI struct{}

ExampleAPI demonstrates dependency behavior. It depends on "example-database" and "example-flaky" so it only starts after both are running. This shows how the API waits for the flaky service to recover from its retries before starting.

func New

func New() (*ExampleAPI, error)

func (*ExampleAPI) Dependencies

func (a *ExampleAPI) Dependencies() []string

Dependencies makes ExampleAPI implement the Dependent interface. The service manager will start example-database and example-flaky before this one.

func (*ExampleAPI) Name

func (a *ExampleAPI) Name() string

func (*ExampleAPI) Run

func (a *ExampleAPI) Run(ctx context.Context) error

func (*ExampleAPI) Stop

func (a *ExampleAPI) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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