logstream

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrivateAddress  = 0
	PublicAddress   = 1
	LoopbackAddress = 2
	Unspecified     = 3
	LinkLocal       = 4
)
View Source
const (
	LogsProcotolID = "/bacalhau/compute/logs/1.0.0"
)

Variables

This section is empty.

Functions

func SortAddresses added in v1.1.4

func SortAddresses(addresses []multiaddr.Multiaddr) []multiaddr.Multiaddr

Types

type AddressType added in v1.1.4

type AddressType int

type LogStreamClient

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

func NewLogStreamClient

func NewLogStreamClient(ctx context.Context, address string) (*LogStreamClient, error)

NewLogStreamClient creates a new client communicating with the provided multiaddr string.

func (*LogStreamClient) Close

func (c *LogStreamClient) Close()

Close will close the underlying stream and resources in-use.

func (*LogStreamClient) Connect

func (c *LogStreamClient) Connect(ctx context.Context, executionID string, withHistory bool, follow bool) error

Connect sends the initial request to the logserver before

func (*LogStreamClient) ReadDataFrame

func (c *LogStreamClient) ReadDataFrame(ctx context.Context) (logger.DataFrame, error)

ReadDataFrame reads a single dataframe from the client's stream (if connected)

type LogStreamRequest

type LogStreamRequest struct {
	ExecutionID string
	WithHistory bool
	Follow      bool
}

type LogStreamServer

type LogStreamServer struct {
	Address string
	// contains filtered or unexported fields
}

func NewLogStreamServer

func NewLogStreamServer(options LogStreamServerOptions) *LogStreamServer

func (*LogStreamServer) Handle

func (s *LogStreamServer) Handle(stream network.Stream)

type LogStreamServerOptions

type LogStreamServerOptions struct {
	Ctx            context.Context
	Host           host.Host
	ExecutionStore store.ExecutionStore
	Executors      executor.ExecutorProvider
}

Jump to

Keyboard shortcuts

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