saf.forward package#

Submodules#

saf.forward.disk module#

The disk forward plugin exists as an implementation example.

It just dumps the collected events to disk

pydantic model saf.forward.disk.DiskConfig[source]#

Bases: ForwardConfigBase

Configuration schema for the disk forward plugin.

Show JSON schema
{
   "title": "DiskConfig",
   "description": "Configuration schema for the disk forward plugin.",
   "type": "object",
   "properties": {
      "plugin": {
         "title": "Plugin",
         "type": "string"
      },
      "path": {
         "title": "Path",
         "type": "string",
         "format": "path"
      },
      "filename": {
         "title": "Filename",
         "type": "string"
      },
      "pretty_print": {
         "title": "Pretty Print",
         "default": false,
         "type": "boolean"
      }
   },
   "required": [
      "plugin",
      "path"
   ]
}

Config:
  • allow_mutation: bool = False

  • underscore_attrs_are_private: bool = True

Fields:
field path: pathlib.Path [Required]#
field filename: Optional[str] = None#
field pretty_print: bool = False#
saf.forward.disk.get_config_schema() Type[DiskConfig][source]#

Get the noop plugin configuration schema.

async saf.forward.disk.forward(*, ctx: PipelineRunContext[DiskConfig], event: CollectedEvent) None[source]#

Method called to forward the event.

saf.forward.noop module#

The NOOP forward plugin exists as an implementation example.

It doesn’t really do anything to the collected event

saf.forward.noop.get_config_schema() Type[ForwardConfigBase][source]#

Get the noop plugin configuration schema.

async saf.forward.noop.forward(*, ctx: PipelineRunContext[ForwardConfigBase], event: CollectedEvent) None[source]#

Method called to forward the event.

saf.forward.test module#

Test forwarder plugin.

The test forward plugin exists as an implementation example and also to be able to test the salt-analytics-framework

It doesn’t really do anything to the collected event.

pydantic model saf.forward.test.TestForwardConfig[source]#

Bases: ForwardConfigBase

Test forwarder configuration.

Show JSON schema
{
   "title": "TestForwardConfig",
   "description": "Test forwarder configuration.",
   "type": "object",
   "properties": {
      "plugin": {
         "title": "Plugin",
         "type": "string"
      },
      "sleep": {
         "title": "Sleep",
         "default": 0.0,
         "type": "number"
      },
      "path": {
         "title": "Path",
         "type": "string",
         "format": "path"
      },
      "message": {
         "title": "Message",
         "type": "string"
      },
      "dump_event": {
         "title": "Dump Event",
         "default": false,
         "type": "boolean"
      },
      "add_event_to_shared_cache": {
         "title": "Add Event To Shared Cache",
         "default": false,
         "type": "boolean"
      }
   },
   "required": [
      "plugin"
   ]
}

Config:
  • allow_mutation: bool = False

  • underscore_attrs_are_private: bool = True

Fields:
field sleep: float = 0.0#
Validated by:
  • _check_mutually_exclusive_parameters

field path: Optional[pathlib.Path] = None#
Validated by:
  • _check_mutually_exclusive_parameters

field message: Optional[str] = None#
Validated by:
  • _check_mutually_exclusive_parameters

field dump_event: bool = False#
Validated by:
  • _check_mutually_exclusive_parameters

field add_event_to_shared_cache: bool = False#
Validated by:
  • _check_mutually_exclusive_parameters

saf.forward.test.get_config_schema() Type[TestForwardConfig][source]#

Get the noop plugin configuration schema.

async saf.forward.test.forward(*, ctx: PipelineRunContext[TestForwardConfig], event: CollectedEvent) None[source]#

Method called to forward the event.