Documentation
¶
Index ¶
- Constants
- type AdapterV1
- func (a *AdapterV1) CloseSession(ctx *types.PluginContext, sessionID string) error
- func (a *AdapterV1) CreateSession(ctx *types.PluginContext, opts logs.CreateSessionOptions) (*logs.LogSession, error)
- func (a *AdapterV1) GetSession(ctx *types.PluginContext, sessionID string) (*logs.LogSession, error)
- func (a *AdapterV1) GetSupportedResources(ctx *types.PluginContext) []logs.Handler
- func (a *AdapterV1) ListSessions(ctx *types.PluginContext) ([]*logs.LogSession, error)
- func (a *AdapterV1) Stream(ctx context.Context, in chan logs.StreamInput) (chan logs.StreamOutput, error)
- func (a *AdapterV1) UpdateSessionOptions(ctx *types.PluginContext, sessionID string, opts logs.LogSessionOptions) (*logs.LogSession, error)
- type Controller
- type Provider
- type ServiceWrapper
- func (s *ServiceWrapper) CloseSession(sessionID string) error
- func (s *ServiceWrapper) CreateSession(plugin, connectionID string, opts logssdk.CreateSessionOptions) (*logssdk.LogSession, error)
- func (s *ServiceWrapper) GetSession(sessionID string) (*logssdk.LogSession, error)
- func (s *ServiceWrapper) GetSupportedResources(pluginID string) []logssdk.Handler
- func (s *ServiceWrapper) HasPlugin(pluginID string) bool
- func (s *ServiceWrapper) ListPlugins() ([]string, error)
- func (s *ServiceWrapper) ListSessions() ([]*logssdk.LogSession, error)
- func (s *ServiceWrapper) SendCommand(sessionID string, cmd logssdk.LogStreamCommand) error
- func (s *ServiceWrapper) ServiceShutdown() error
- func (s *ServiceWrapper) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
- func (s *ServiceWrapper) UpdateSessionOptions(sessionID string, opts logssdk.LogSessionOptions) (*logssdk.LogSession, error)
Constants ¶
const ( BatchFlushInterval = 50 * time.Millisecond BatchMaxSize = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterV1 ¶ added in v0.2.0
type AdapterV1 struct {
// contains filtered or unexported fields
}
AdapterV1 wraps SDK v1 logs.Provider as the engine canonical Provider. For v1, all methods are direct delegation (types identical). When v2 ships and canonical types diverge, AdapterV1 translates v1 → canonical.
func NewAdapterV1 ¶ added in v0.2.0
NewAdapterV1 creates a new v1 adapter wrapping the given SDK logs provider.
func (*AdapterV1) CloseSession ¶ added in v0.2.0
func (a *AdapterV1) CloseSession(ctx *types.PluginContext, sessionID string) error
func (*AdapterV1) CreateSession ¶ added in v0.2.0
func (a *AdapterV1) CreateSession(ctx *types.PluginContext, opts logs.CreateSessionOptions) (*logs.LogSession, error)
func (*AdapterV1) GetSession ¶ added in v0.2.0
func (a *AdapterV1) GetSession(ctx *types.PluginContext, sessionID string) (*logs.LogSession, error)
func (*AdapterV1) GetSupportedResources ¶ added in v0.2.0
func (a *AdapterV1) GetSupportedResources(ctx *types.PluginContext) []logs.Handler
func (*AdapterV1) ListSessions ¶ added in v0.2.0
func (a *AdapterV1) ListSessions(ctx *types.PluginContext) ([]*logs.LogSession, error)
func (*AdapterV1) Stream ¶ added in v0.2.0
func (a *AdapterV1) Stream(ctx context.Context, in chan logs.StreamInput) (chan logs.StreamOutput, error)
func (*AdapterV1) UpdateSessionOptions ¶ added in v0.2.0
func (a *AdapterV1) UpdateSessionOptions( ctx *types.PluginContext, sessionID string, opts logs.LogSessionOptions, ) (*logs.LogSession, error)
type Controller ¶
type Controller interface {
internaltypes.Controller
ServiceStartup(ctx context.Context, options application.ServiceOptions) error
ServiceShutdown() error
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 logging.Logger, sp pkgsettings.Provider, resourceClient resource.Service, ) Controller
type Provider ¶ added in v0.4.0
type Provider interface {
GetSupportedResources(ctx *types.PluginContext) []logs.Handler
CreateSession(ctx *types.PluginContext, opts logs.CreateSessionOptions) (*logs.LogSession, error)
GetSession(ctx *types.PluginContext, sessionID string) (*logs.LogSession, error)
ListSessions(ctx *types.PluginContext) ([]*logs.LogSession, error)
CloseSession(ctx *types.PluginContext, sessionID string) error
UpdateSessionOptions(ctx *types.PluginContext, sessionID string, opts logs.LogSessionOptions) (*logs.LogSession, error)
Stream(ctx context.Context, in chan logs.StreamInput) (chan logs.StreamOutput, error)
}
Provider is the engine's version-independent interface for log plugins. For v1, method signatures match SDK logs.Provider exactly (doc 20 §13.7). When v2 redesigns logs (context.Context, interfaces), this diverges.
type ServiceWrapper ¶ added in v0.4.0
type ServiceWrapper struct {
Ctrl Controller
}
ServiceWrapper is an explicit delegation wrapper around logs.Controller. Excluded: OnPluginInit, OnPluginStart, OnPluginStop, OnPluginShutdown,
OnPluginDestroy
func (*ServiceWrapper) CloseSession ¶ added in v0.4.0
func (s *ServiceWrapper) CloseSession(sessionID string) error
func (*ServiceWrapper) CreateSession ¶ added in v0.4.0
func (s *ServiceWrapper) CreateSession( plugin, connectionID string, opts logssdk.CreateSessionOptions, ) (*logssdk.LogSession, error)
func (*ServiceWrapper) GetSession ¶ added in v0.4.0
func (s *ServiceWrapper) GetSession(sessionID string) (*logssdk.LogSession, error)
func (*ServiceWrapper) GetSupportedResources ¶ added in v0.4.0
func (s *ServiceWrapper) GetSupportedResources(pluginID string) []logssdk.Handler
func (*ServiceWrapper) HasPlugin ¶ added in v0.4.0
func (s *ServiceWrapper) HasPlugin(pluginID string) bool
func (*ServiceWrapper) ListPlugins ¶ added in v0.4.0
func (s *ServiceWrapper) ListPlugins() ([]string, error)
func (*ServiceWrapper) ListSessions ¶ added in v0.4.0
func (s *ServiceWrapper) ListSessions() ([]*logssdk.LogSession, error)
func (*ServiceWrapper) SendCommand ¶ added in v0.4.0
func (s *ServiceWrapper) SendCommand(sessionID string, cmd logssdk.LogStreamCommand) error
func (*ServiceWrapper) ServiceShutdown ¶ added in v0.4.0
func (s *ServiceWrapper) ServiceShutdown() error
func (*ServiceWrapper) ServiceStartup ¶ added in v0.4.0
func (s *ServiceWrapper) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
func (*ServiceWrapper) UpdateSessionOptions ¶ added in v0.4.0
func (s *ServiceWrapper) UpdateSessionOptions( sessionID string, opts logssdk.LogSessionOptions, ) (*logssdk.LogSession, error)