counter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package counter provides a counter service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ID is a unique identifier for the node.
	ID string

	// RPCAddr is the address to listen for RPC connections.
	RPCAddr string

	// FuddleAddrs contains fuddle registry seed nodes.
	FuddleAddrs []string

	// Locality is the location of the node in the cluster.
	Locality string

	// Revision is the build commit.
	Revision string
}

Config contains the node configuration.

func (*Config) MarshalLogObject

func (c *Config) MarshalLogObject(e zapcore.ObjectEncoder) error

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithRPCListener

func WithRPCListener(ln net.Listener) Option

WithRPCListener uses the given listener for the gRPC server instead of binding to a new listener.

type Service

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

Service implements the counter service.

func NewService

func NewService(conf *Config, opts ...Option) *Service

func (*Service) GracefulStop

func (s *Service) GracefulStop()

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop()

Jump to

Keyboard shortcuts

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