service

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: BSD-3-Clause Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService added in v0.9.0

func RegisterService(ctx context.Context, scheme string, f ServiceInitializeFunc) error

func Schemes added in v0.9.0

func Schemes() []string

func SetParametersFromURI added in v0.9.0

func SetParametersFromURI(ctx context.Context, s Service, uri string) error

Types

type FSService added in v0.9.0

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

func (*FSService) Close added in v0.9.0

func (s *FSService) Close(ctx context.Context) error

func (*FSService) LastInt added in v0.9.0

func (s *FSService) LastInt(ctx context.Context) (int64, error)

func (*FSService) NextInt added in v0.9.0

func (s *FSService) NextInt(ctx context.Context) (int64, error)

func (*FSService) SetIncrement added in v0.9.0

func (s *FSService) SetIncrement(ctx context.Context, i int64) error

func (*FSService) SetLastInt added in v0.9.0

func (s *FSService) SetLastInt(ctx context.Context, i int64) error

func (*FSService) SetOffset added in v0.9.0

func (s *FSService) SetOffset(ctx context.Context, i int64) error

type MemoryService added in v0.9.0

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

func (*MemoryService) Close added in v0.9.0

func (s *MemoryService) Close(ctx context.Context) error

func (*MemoryService) LastInt added in v0.9.0

func (s *MemoryService) LastInt(ctx context.Context) (int64, error)

func (*MemoryService) NextInt added in v0.9.0

func (s *MemoryService) NextInt(ctx context.Context) (int64, error)

func (*MemoryService) SetIncrement added in v0.9.0

func (s *MemoryService) SetIncrement(ctx context.Context, i int64) error

func (*MemoryService) SetLastInt added in v0.9.0

func (s *MemoryService) SetLastInt(ctx context.Context, i int64) error

func (*MemoryService) SetOffset added in v0.9.0

func (s *MemoryService) SetOffset(ctx context.Context, i int64) error

type Service added in v0.9.0

type Service interface {
	NextInt(context.Context) (int64, error)
	LastInt(context.Context) (int64, error)
	SetLastInt(context.Context, int64) error
	SetOffset(context.Context, int64) error
	SetIncrement(context.Context, int64) error
	Close(context.Context) error
}

func NewFSService added in v0.9.0

func NewFSService(ctx context.Context, uri string) (Service, error)

func NewMemoryService added in v0.9.0

func NewMemoryService(ctx context.Context, uri string) (Service, error)

func NewService added in v0.9.0

func NewService(ctx context.Context, uri string) (Service, error)

type ServiceInitializeFunc added in v0.9.0

type ServiceInitializeFunc func(ctx context.Context, uri string) (Service, error)

Jump to

Keyboard shortcuts

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