Documentation ¶
Index ¶
- func StartPlugin(impl ComputationImplementation)
- type ComputationImplementation
- type ComputationPlugin
- func (p *ComputationPlugin) GetInfo(definition string, response *dagger.ComputationPluginInfo) error
- func (p *ComputationPlugin) GetState(_ struct{}, response *[]byte) error
- func (p *ComputationPlugin) SetState(state []byte, response *string) error
- func (p *ComputationPlugin) SubmitRecord(t *dagger.Record, response *dagger.ComputationPluginResponse) error
- type TimeBucketsComputation
- func (c *TimeBucketsComputation) GetInfo(definition string) (dagger.ComputationPluginInfo, error)
- func (c *TimeBucketsComputation) GetState() ([]byte, error)
- func (c *TimeBucketsComputation) SetState(state []byte) error
- func (c *TimeBucketsComputation) SubmitRecord(t *dagger.Record) ([]*dagger.Record, error)
- type TimeBucketsProcessor
- type TimeBucketsState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPlugin ¶
func StartPlugin(impl ComputationImplementation)
StartPlugin starts serving RPC requests and brokers data between RPC caller and the computation
Types ¶
type ComputationImplementation ¶
type ComputationImplementation interface { GetInfo(definition string) (dagger.ComputationPluginInfo, error) SubmitRecord(t *dagger.Record) ([]*dagger.Record, error) GetState() ([]byte, error) SetState([]byte) error }
ComputationImplementation represents a specific computation implementation
type ComputationPlugin ¶
type ComputationPlugin struct {
// contains filtered or unexported fields
}
ComputationPlugin handles RPC calls from the main dagger process
func (*ComputationPlugin) GetInfo ¶
func (p *ComputationPlugin) GetInfo(definition string, response *dagger.ComputationPluginInfo) error
GetInfo returns the inputs to this computation
func (*ComputationPlugin) GetState ¶
func (p *ComputationPlugin) GetState(_ struct{}, response *[]byte) error
GetState returns the dump of computation's state to dagger
func (*ComputationPlugin) SetState ¶
func (p *ComputationPlugin) SetState(state []byte, response *string) error
SetState seeds the state of the computation
func (*ComputationPlugin) SubmitRecord ¶
func (p *ComputationPlugin) SubmitRecord(t *dagger.Record, response *dagger.ComputationPluginResponse) error
SubmitRecord submits the record into processing
type TimeBucketsComputation ¶
type TimeBucketsComputation struct {
// contains filtered or unexported fields
}
func NewTimeBucketsComputation ¶
func NewTimeBucketsComputation(processor TimeBucketsProcessor) *TimeBucketsComputation
func (*TimeBucketsComputation) GetInfo ¶
func (c *TimeBucketsComputation) GetInfo(definition string) (dagger.ComputationPluginInfo, error)
func (*TimeBucketsComputation) GetState ¶
func (c *TimeBucketsComputation) GetState() ([]byte, error)
func (*TimeBucketsComputation) SetState ¶
func (c *TimeBucketsComputation) SetState(state []byte) error
func (*TimeBucketsComputation) SubmitRecord ¶
type TimeBucketsProcessor ¶
type TimeBucketsState ¶
type TimeBucketsState struct { LastLWM dagger.Timestamp `json:"last_lwm"` ProcessorState *json.RawMessage `json:"processor_state"` }
Click to show internal directories.
Click to hide internal directories.