fakeservice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Overview

Package fakeservice contains fake implementations of interfaces from package service.

It is recommended to fill all methods that shouldn't be called with:

panic("not implemented")

in the body of the test, so that if the method is called the panic backtrace points to the method definition in the test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	OnStart    func(ctx context.Context) (err error)
	OnShutdown func(ctx context.Context) (err error)
}

Service is the service.Interface for tests.

func (*Service) Shutdown

func (s *Service) Shutdown(ctx context.Context) (err error)

Shutdown implements the service.Interface interface for *Service.

func (*Service) Start

func (s *Service) Start(ctx context.Context) (err error)

Start implements the service.Interface interface for *Service.

Jump to

Keyboard shortcuts

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