core

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_NOT_FOUND = "not found"

Variables

View Source
var DefaultEpochSleep = time.Minute * 20
View Source
var DefaultMaxEntries int64 = 256
View Source
var DefaultPullingSleep = time.Second * 10

Functions

func AddByDomain added in v0.0.33

func AddByDomain[C CtClient](
	domain string,
	def DefaultCTClient[C],
	clients *CTClients[C],
	null func() C,
) (C, int, error)

func DelByDomain added in v0.0.33

func DelByDomain[C CtClient](
	domain string,
	clients *CTClients[C],
	null func() C,
) (C, int, error)

func SelectByDomain added in v0.0.33

func SelectByDomain[C CtClient](
	domain string,
	clients *CTClients[C],
	null func() C,
) (C, int, error)

Types

type CTClients added in v0.0.36

type CTClients[T CtClient] struct {
	Clients []T
	Sleep   time.Duration
}

func NewCTClients added in v0.0.36

func NewCTClients[T CtClient](clients []T, sleep time.Duration) (*CTClients[T], error)

func (*CTClients[T]) GetDomain added in v0.0.36

func (clients *CTClients[T]) GetDomain() string

func (*CTClients[T]) Init added in v0.0.36

func (clients *CTClients[T]) Init() error

func (*CTClients[T]) Next added in v0.0.36

func (clients *CTClients[T]) Next(callback Callback)

type CTStream

type CTStream[T CtClient] struct {
	Client T
	Sleep  time.Duration
	Ctx    context.Context
	Wg     sync.WaitGroup
	// contains filtered or unexported fields
}

func NewCTStream

func NewCTStream[T CtClient](
	client T,
	sleep time.Duration,
	Ctx context.Context,
) (*CTStream[T], error)

func (*CTStream[T]) Await

func (stream *CTStream[T]) Await()

func (*CTStream[T]) Init

func (stream *CTStream[T]) Init() error

func (*CTStream[T]) Next

func (stream *CTStream[T]) Next(callback Callback)

func (*CTStream[T]) Run

func (stream *CTStream[T]) Run(callback Callback)

func (*CTStream[T]) Start

func (stream *CTStream[T]) Start(callback Callback)

func (*CTStream[T]) Stop

func (stream *CTStream[T]) Stop()

type CTsStream

type CTsStream[T CtStream] PararellCTsStream[T]

type Callback

type Callback func(*ctx509.Certificate, int, any, error)

type CtClient

type CtClient interface {
	Init() error
	Next(callback Callback)
	GetDomain() string
}

type CtStream

type CtStream interface {
	Init() error
	Start(Callback)
	Next(callback Callback)
	Run(Callback)
	Stop()
	Await()
}

type DefaultCTClient added in v0.0.36

type DefaultCTClient[C CtClient] func(string) (C, error)

type LogID

type LogID = int64

type PararellCTsStream added in v0.0.24

type PararellCTsStream[T CtStream] struct {
	Streams []T
	Sleep   time.Duration
}

func NewPararellCTsStream added in v0.0.24

func NewPararellCTsStream[T CtStream](streams []T, sleep time.Duration) (*PararellCTsStream[T], error)

func (PararellCTsStream[T]) Await added in v0.0.24

func (stream PararellCTsStream[T]) Await()

func (*PararellCTsStream[T]) Init added in v0.0.24

func (stream *PararellCTsStream[T]) Init() error

func (*PararellCTsStream[T]) Next added in v0.0.24

func (stream *PararellCTsStream[T]) Next(callback Callback)

func (*PararellCTsStream[T]) Run added in v0.0.24

func (stream *PararellCTsStream[T]) Run(callback Callback)

func (*PararellCTsStream[T]) Start added in v0.0.24

func (stream *PararellCTsStream[T]) Start(callback Callback)

func (*PararellCTsStream[T]) Stop added in v0.0.24

func (stream *PararellCTsStream[T]) Stop()

Jump to

Keyboard shortcuts

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