convo

package
v0.0.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDuplicateQuestion = errors.New("duplicate question")
	ErrNoQuestions       = errors.New("no questions")
)

Functions

This section is empty.

Types

type Answerer

type Answerer[K comparable, V any] interface {
	Answer(ctx context.Context, key K, answer V) error
}

type AskFunc

type AskFunc[K comparable] func(ctx context.Context, key K) error

type Asker

type Asker[K comparable, V any] interface {
	Ask(ctx context.Context, key K, fn AskFunc[K]) (V, error)
}

type Questions

type Questions[K comparable, V any] interface {
	Asker[K, V]
	Answerer[K, V]
}

func NewQuestions

func NewQuestions[K comparable, V any]() Questions[K, V]

Jump to

Keyboard shortcuts

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