rpc

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(ctx context.Context) error

Types

type Limiter

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

func NewLimiter

func NewLimiter(conf *pb.Limiter) *Limiter

func (*Limiter) Config

func (l *Limiter) Config() *pb.Limiter

func (*Limiter) Take

func (l *Limiter) Take() time.Time

type Service

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

func NewService

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

func (*Service) Flush

func (s *Service) Flush(ctx context.Context, req *pb.Limiter, ret *pb.Limiter) error

func (*Service) List

func (s *Service) List(ctx context.Context, req *pb.Limiter, ret *pb.LimiterList) error

func (*Service) NewLimiter

func (s *Service) NewLimiter(ctx context.Context, req *pb.Limiter, ret *pb.Limiter) error

func (*Service) RemoveLimiter

func (s *Service) RemoveLimiter(ctx context.Context, req *pb.Limiter, ret *pb.Limiter) error

func (*Service) Take

func (s *Service) Take(ctx context.Context, req *pb.Limiter, ret *pb.Limiter) error

Jump to

Keyboard shortcuts

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