Documentation ¶
Overview ¶
Package testservices contains services useful for testing. They are not intended to be exposed by end users and so this package should only be imported in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct { DefinitionFunc func() service.Definition RunFunc func(ctx context.Context, host service.Host) error UpdateFunc func(newConfig any) error DataFunc func() any }
The Fake service allows injecting custom behavior for interface methods.
func (*Fake) Data ¶
Data implements service.Service. If f.DataFunc is non-nil, it will be used. Otherwise, a default implementation is used.
func (*Fake) Definition ¶
func (f *Fake) Definition() service.Definition
Definition implements service.Service. If f.DefinitionFunc is non-nil, it will be used. Otherwise, a default implementation is used.
func (*Fake) Run ¶
Run implements service.Service. If f.RunFunc is non-nil, it will be used. Otherwise, a default implementation is used.
Click to show internal directories.
Click to hide internal directories.