starstats

package
v0.1.0-dev.20260314201016 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Params = op.MethodParams{
	"ComputeStats": {"files", "with_bytes", "with_loc"},
}

Params maps Go method names to Starlark parameter name lists.

Receiver is the ReceiverFactory for the starstats provider.

Functions

This section is empty.

Types

type Factory

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

Factory implements op.ReceiverFactory for the starstats provider.

func (*Factory) GetOrCreateProvider

func (f *Factory) GetOrCreateProvider(ctx op.Context) op.ContextProvider

GetOrCreateProvider returns a cached provider for the given context, creating one if needed. The provider is invalidated when the Root changes.

Parameters:

  • ctx: the execution context providing Root and platform state.

Returns:

  • op.ContextProvider: the provider instance.

func (*Factory) NewExecuting

func (f *Factory) NewExecuting(ctx op.Context) starlark.Value

NewExecuting creates a Starlark receiver that dispatches method calls to a fresh provider.

Parameters:

  • ctx: the execution context.

Returns:

  • starlark.Value: the executing receiver.

func (*Factory) ProviderType

func (f *Factory) ProviderType() reflect.Type

ProviderType returns the reflect.Type of the underlying provider struct.

Returns:

  • reflect.Type: the provider's concrete type.

func (*Factory) ReceiverName

func (f *Factory) ReceiverName() string

ReceiverName returns the Starlark receiver name for this provider.

Returns:

  • string: the receiver name "starstats".

func (*Factory) Register

func (f *Factory) Register(_ *op.ActionRegistry, _ op.Context)

Register registers receiver params for this provider.

Parameters:

  • registry: the action registry (unused for immediate-only providers).
  • ctx: the execution context (unused).

Jump to

Keyboard shortcuts

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