actor

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 2 Imported by: 1

README

actor

experiments

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start[T any](ctx context.Context, mailbox Mailbox[T], callbacks Callbacks[T], options ...Option)

Types

type Callbacks

type Callbacks[T any] interface {
	Received(T)
	Stopped()
}

type Mailbox

type Mailbox[T any] <-chan T

type MailboxSize

type MailboxSize int

type Option

type Option func(actorOptions) actorOptions

func WithAbsoluteTimeout

func WithAbsoluteTimeout(timeout time.Duration) Option

func WithIdleTimeout

func WithIdleTimeout(timeout time.Duration) Option

func WithRespawnAfter

func WithRespawnAfter(respawnAfter RequestCount) Option

type RequestCount

type RequestCount int

Jump to

Keyboard shortcuts

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