flurry

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package flurry contains the functions for launching a Flurry instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Daemon

func Daemon(t time.Duration, name string, critical bool, killdate int64, l man.Linker, guard string, key []byte, files []string)

Daemon will start the process of locating and triggering a Guardian as a *nix daemon or a Windows service. This function will run 'Start' every 'wait' duration and will run until it receives a SIGINT or SIGTERM to shut down safely. (or a ServiceStop message in the case of Windows)

Arguments:

t        - Duration period to be used to run 'Start' with the arguments
            supplied. If this is less than or equal to zero, this function
            will run 'Start' and bail.
name     - The service name when running under Windows. This may empty as it
            is ignored under *nix.
critical - If True, take advantage of 'RtlSetProcessIsCritical' WinAPI call
            (Windows only obviously). And will make itself un-terminatable
            while running.
killdate - If this is not zero, this specifies the date when this Flurry will
            stop functioning. This is represented in Unix epoch time.
l        - Guardian Linker type to use. If nil, will default to 'Pipe'.
guard    - String name for the Guardian to look for/create. DO NOT FORMAT
            THIS NAME, it will be formatted based on the Linker type.
key      - Encryption key as a bytes array used to XOR decrypt/unwrap the
            data in the supplied files list.
files    - List of files to check against. Each file will be checked in a
            random order

func Loop

func Loop(wait time.Duration, critical bool, killdate int64, l man.Linker, guard string, key []byte, files []string)

Loop attempts to create a Flurry instance with the supplied arguments. This function will run 'Start' every 'wait' duration and will run until it receives a SIGINT or SIGTERM to shut down safely.

This function will block and will NOT return (it calls 'device.GoExit').

Arguments:

wait     - Duration period to be used to run 'Start' with the arguments
            supplied. If this is less than or equal to zero, this function
            will run 'Start' and bail.
critical - If True, take advantage of 'RtlSetProcessIsCritical' WinAPI call
            (Windows only obviously). And will make itself un-terminatable
            while running.
killdate - If this is not zero, this specifies the date when this Flurry will
            stop functioning. This is represented in Unix epoch time.
l        - Guardian Linker type to use. If nil, will default to 'Pipe'.
guard    - String name for the Guardian to look for/create. DO NOT FORMAT
            THIS NAME, it will be formatted based on the Linker type.
key      - Encryption key as a bytes array used to XOR decrypt/unwrap the
            data in the supplied files list.
files    - List of files to check against. Each file will be checked in a
            random order and is expected to be encrypted using the supplied
            key value.

func Start

func Start(critical bool, killdate int64, l man.Linker, guard string, key []byte, files []string)

Start attempts to create a Flurry instance with the supplied arguments.

This function will block and will NOT return (it calls 'device.GoExit').

Arguments:

critical - If True, take advantage of 'RtlSetProcessIsCritical' WinAPI call
            (Windows only obviously). And will make itself un-terminatable
            while running.
killdate - If this is not zero, this specifies the date when this Flurry will
            stop functioning. This is represented in Unix epoch time.
l        - Guardian Linker type to use. If nil, will default to 'Pipe'.
guard    - String name for the Guardian to look for/create. DO NOT FORMAT
            THIS NAME, it will be formatted based on the Linker type.
key      - Encryption key as a bytes array used to XOR decrypt/unwrap the
            data in the supplied files list.
files    - List of files to check against. Each file will be checked in a
            random order and is expected to be encrypted using the supplied
            key value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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