service

package
v0.0.0-...-56eb26a Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key any) (interface{}, bool)
	Set(key any, value interface{})
}

type Config

type Config struct {
}

type Locations

type Locations interface {
	GetLocation(ctx context.Context, location string) (*model.Location, error)
}

type Persistence

type Persistence interface {
	GetLocation(ctx context.Context, address string) (*model.Location, error)
	UpsertLocation(ctx context.Context, location *model.Location) error
}

type PubSub

type PubSub interface {
	Publish(context.Context, string, any) error
	Subscribe(string, func(context.Context, string, any) error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, pubsub PubSub, cache Cache, persistence Persistence, locations Locations, logger *otelzap.Logger) *Service

func (*Service) CheckHealth

func (s *Service) CheckHealth() error

func (*Service) GetLocation

func (s *Service) GetLocation(ctx context.Context, address string) (*model.Location, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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