Help us shape the future of Go! Take the 2026 Go Developer Survey

livelog

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

func (*Data) CatLog

func (s *Data) CatLog(ctx context.Context, output io.Writer) error

func (*Data) ConfigNonInteractive

func (s *Data) ConfigNonInteractive(ctx context.Context, cliProductId, cliServerId string) error

func (*Data) DisplayConfig

func (s *Data) DisplayConfig(ctx context.Context) error

func (*Data) GetConfigData

func (s *Data) GetConfigData(ctx context.Context, productId, serviceId string) (srvConfig *model.Config, err error)

func (*Data) GetLogsRefreshRate

func (s *Data) GetLogsRefreshRate() (logsRefreshRate time.Duration)

func (*Data) GetProductId

func (s *Data) GetProductId() string

func (*Data) GetServiceId

func (s *Data) GetServiceId() string

func (*Data) GetServiceLayer

func (s *Data) GetServiceLayer() servicelayer.ServiceLayer

func (*Data) LogNonInteractive

func (s *Data) LogNonInteractive(ctx context.Context, cliProductId, cliServerId, nodeId, logName string, isStreaming bool) error

func (*Data) PrintLogs

func (s *Data) PrintLogs(ctx context.Context, nodeId, logName string, isStreaming bool) error

func (*Data) SetLogsRefreshRate

func (s *Data) SetLogsRefreshRate(logsRefreshRate time.Duration)

func (*Data) SetProductId

func (s *Data) SetProductId(productId string)

func (*Data) SetServiceId

func (s *Data) SetServiceId(serviceId string)

func (*Data) SetServiceLayer

func (s *Data) SetServiceLayer(productId string) error

type LiveLogs

type LiveLogs interface {
	// The non interactive flow to display logs data.
	// The configured product id, server id, node id and log file name are used.
	// Any error during read or write is returned.
	LogNonInteractive(ctx context.Context, cliProductId, cliServerId, nodeId, logName string, isStreaming bool) error

	// Writes continuous or given single log data snapshots from the remote service into the passed io.Writer.
	// The configured product id, server id, node id and log file name are used.
	// Any error during read or write is returned.
	PrintLogs(ctx context.Context, nodeId, logName string, isStreaming bool) error

	// Displays the list of available nodes and log files.
	ConfigNonInteractive(ctx context.Context, cliProductId, cliServerId string) error

	// A wrapper around service config api method call.
	GetConfigData(ctx context.Context, productId, serviceId string) (srvConfig *model.Config, err error)

	// Displays the list of available nodes and log files.
	DisplayConfig(ctx context.Context) error

	// Sets the product id to use when querying the remote service for log data.
	SetProductId(productId string)
	GetProductId() (productId string)

	// Sets the service id to use when querying the remote service for log data.
	SetServiceId(serviceId string)
	GetServiceId() (serviceId string)

	// Sets the log refresh rate to use when querying the remote service for log data in tail mode.
	SetLogsRefreshRate(logsRefreshRate time.Duration)
	GetLogsRefreshRate() (logsRefreshRate time.Duration)

	// Sets and gets the a service layer.
	SetServiceLayer(productId string) error
	GetServiceLayer() servicelayer.ServiceLayer
}

func NewLiveLogs

func NewLiveLogs() LiveLogs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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