util

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecFromServiceRec

func RecFromServiceRec(r *netpb.Log_Record) *apipb.Record

func RecToServiceRec

func RecToServiceRec(r *apipb.Record) *netpb.Log_Record

Types

type Semaphore

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

func NewSemaphore

func NewSemaphore(capacity int) *Semaphore

func (*Semaphore) Acquire

func (s *Semaphore) Acquire()

Blocking acquire

func (*Semaphore) Release

func (s *Semaphore) Release()

func (*Semaphore) TryAcquire

func (s *Semaphore) TryAcquire() bool

Non-blocking acquire

type SemaphoreKey

type SemaphoreKey interface {
	Key() string
}

type SemaphorePool

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

func NewSemaphorePool

func NewSemaphorePool(semaCap int) *SemaphorePool

func (*SemaphorePool) Get

func (*SemaphorePool) Stop

func (p *SemaphorePool) Stop()

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL