future

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Future

type Future interface {
	Get(ctx context.Context) (interface{}, error)
	Ready() bool
}

type FutureImpl

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

func NewFuture

func NewFuture() *FutureImpl

func (*FutureImpl) Get

func (f *FutureImpl) Get(
	ctx context.Context,
) (interface{}, error)

func (*FutureImpl) Ready

func (f *FutureImpl) Ready() bool

func (*FutureImpl) Set

func (f *FutureImpl) Set(
	value interface{},
	err error,
)

type ReadyFutureImpl

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

func NewReadyFuture

func NewReadyFuture(
	value interface{},
	err error,
) *ReadyFutureImpl

func (*ReadyFutureImpl) Get

func (f *ReadyFutureImpl) Get(
	_ context.Context,
) (interface{}, error)

func (*ReadyFutureImpl) Ready

func (f *ReadyFutureImpl) Ready() bool

Jump to

Keyboard shortcuts

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