logs

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BatchFlushInterval = 50 * time.Millisecond
	BatchMaxSize       = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(controller Controller) *Client

func (*Client) CloseSession

func (c *Client) CloseSession(sessionID string) error

func (*Client) CreateSession

func (c *Client) CreateSession(
	plugin, connectionID string,
	opts sdklogs.CreateSessionOptions,
) (*sdklogs.LogSession, error)

func (*Client) GetSession

func (c *Client) GetSession(sessionID string) (*sdklogs.LogSession, error)

func (*Client) GetSupportedResources

func (c *Client) GetSupportedResources(pluginID string) []sdklogs.Handler

func (*Client) ListSessions

func (c *Client) ListSessions() ([]*sdklogs.LogSession, error)

func (*Client) PauseSession

func (c *Client) PauseSession(sessionID string) error

func (*Client) ResumeSession

func (c *Client) ResumeSession(sessionID string) error

func (*Client) UpdateSessionOptions

func (c *Client) UpdateSessionOptions(
	sessionID string,
	opts sdklogs.LogSessionOptions,
) (*sdklogs.LogSession, error)

type Controller

type Controller interface {
	internaltypes.Controller
	Run(ctx context.Context)
	GetSupportedResources(pluginID string) []logs.Handler
	CreateSession(plugin, connectionID string, opts logs.CreateSessionOptions) (*logs.LogSession, error)
	GetSession(sessionID string) (*logs.LogSession, error)
	ListSessions() ([]*logs.LogSession, error)
	CloseSession(sessionID string) error
	SendCommand(sessionID string, cmd logs.LogStreamCommand) error
	UpdateSessionOptions(sessionID string, opts logs.LogSessionOptions) (*logs.LogSession, error)
}

Controller manages log sessions across all plugins.

func NewController

func NewController(
	logger *zap.SugaredLogger,
	sp pkgsettings.Provider,
	resourceClient resource.IClient,
) Controller

Jump to

Keyboard shortcuts

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