Documentation ¶
Index ¶
- Constants
- func AWSDownloadS3Bucket(s *State, payload *Payload) error
- func BaseFunctionName(i interface{}) string
- func BytesMatrix(buffer []byte) [][]string
- func CallerName() string
- func CutFields(s *State, payload *Payload) error
- func DeleteWhiteListIOC(s *State, payload *Payload) error
- func DomainIOC(s *State, payload *Payload) error
- func DurationTime(name string, mesg []byte, scope *Scope) error
- func EndTime(name string, mesg []byte, scope *Scope) error
- func EventInit()
- func FastLogger(s string, arg ...interface{})
- func FileRead(s *State, payload *Payload) error
- func FileTextReader(s *State, payload *Payload) error
- func FileTextWriter(s *State, payload *Payload) error
- func FileWrite(s *State, payload *Payload) error
- func FilterWhiteListIOC(s *State, payload *Payload) error
- func FunctionName(i interface{}) string
- func IOC(re *regexp.Regexp, rawbytes []byte, hashtype string) ([]byte, error)
- func IOCDataToJson(s *State, payload *Payload) error
- func IOCtoData(s *State, payload *Payload) error
- func Ipv4IOC(s *State, payload *Payload) error
- func Ipv6IOC(s *State, payload *Payload) error
- func Logger(s string, arg ...interface{})
- func MatrixBytes(matrix [][]string, buffer []byte) ([]byte, error)
- func MatrixCut(matrix [][]string, cutrow []bool) [][]string
- func MatrixSelect(matrix [][]string, selectrow []bool) [][]string
- func Md5IOC(s *State, payload *Payload) error
- func NormalIOC(s *State, payload *Payload) error
- func ProcessEvent()
- func SelectFields(s *State, payload *Payload) error
- func SendEvent(e Gevent)
- func Sha1IOC(s *State, payload *Payload) error
- func Sha256IOC(s *State, payload *Payload) error
- func StartTime(name string, mesg []byte, scope *Scope) error
- func SubGraph(s *State, payload *Payload) error
- func Trace(name string, mesg []byte, scope *Scope) error
- func UrlIOC(s *State, payload *Payload) error
- func WhiteListIOC(s *State, payload *Payload) error
- type Aspect
- type AspectAction
- type Edge
- type FileState
- type Gevent
- type Graph
- type Graphline
- func (g *Graphline) CallStage(graphid string, name string, state *State) (int, error)
- func (g *Graphline) Execute(gname string, payload *Payload) error
- func (g *Graphline) PrintPath(graphid string)
- func (g *Graphline) PublishGraphs()
- func (g *Graphline) RegisterAspect(graphid string, action AspectAction, stage func(*State, *Payload) error, ...) error
- func (g *Graphline) RegisterStage(sfunc func(*State, *Payload) error) error
- func (g *Graphline) RunAspects(name string, mesg []byte, scope *Scope, asp map[string]*Aspect) error
- func (g *Graphline) Sequence(graphspec string) ([]string, error)
- func (g *Graphline) SetState(gname string, name string, state *State) (int, error)
- type IOCs
- type Parser
- type Payload
- type Scanner
- type Scope
- type Stage
- type State
- type Token
- type Vertex
Constants ¶
const ( MESSAGE peventid = iota + 1 FMETRIC IMETRIC )
Graphline event IDs
Variables ¶
This section is empty.
Functions ¶
func AWSDownloadS3Bucket ¶
AWSDownloadS3Bucket : graph stage that downloads a file from an S3 bucket and returns it as raw bytes
func BytesMatrix ¶
BytesMatrix : create matrix from text stored in a byte slice
func DeleteWhiteListIOC ¶
DeleteWhiteListIOC :
func DurationTime ¶
DurationTime : aspect to calculate the duration and send an event. Uses the times from StartTime and EndTime
func EventInit ¶
func EventInit()
EventInit : initiate the event channel and start a go routine to process events
func FastLogger ¶
func FastLogger(s string, arg ...interface{})
FastLogger : fast structured logger for hot paths
func FileTextReader ¶
FileTextReader : graph stage to read a text file one line at a time and send as a stream
state of the stream, open or closed, is stored in the payload.Data field. Closed is sent after file has been read
func FileTextWriter ¶
FileTextWriter : graph stage to write a stream to a text file one line at a time
looks for closed status in payload.Data to close the file
func FilterWhiteListIOC ¶
FilterWhiteListIOC :
func IOCDataToJson ¶
IOCDataToJson : marshall the Data field to JSON in the Raw field
func MatrixBytes ¶
MatrixBytes : convert matrix to text in a byte slice
func MatrixSelect ¶
MatrixSelect : select fields from a matrix
func ProcessEvent ¶
func ProcessEvent()
ProcessEvent : every second, process events from the event channel
func SubGraph ¶
SubGraph : graph stage to execute a sub-graph
The subgraph must have been made public by PublishGraphs()
Types ¶
type Aspect ¶
type Aspect struct {
// contains filtered or unexported fields
}
Aspect :
type AspectAction ¶
type AspectAction int
AspectAction :
const ( RETRY AspectAction = iota + 1 CANCEL CONTINUE DEALDLINE TIMEOUT ERROR START END )
Aspect action :
type Gevent ¶
type Gevent struct {
// contains filtered or unexported fields
}
Gevent : graphline events for logging, observability, metrics, etc.
type Graph ¶
type Graph struct { V []*Vertex E []*Edge Path []*Vertex // contains filtered or unexported fields }
Graph : graph type of vertexes and edges and execution path
func (*Graph) BuildPath ¶
func (g *Graph) BuildPath()
Path : build the execution path by walking through the graph depth first until a vertex is found with incomplete inputs
go back to the last vertex with a fork in the path and start the next walk
func (*Graph) NextVertex ¶
NextVertex : get the next vertex in the path, returns nil if at the path end
type Graphline ¶
type Graphline struct {
// contains filtered or unexported fields
}
Graphline : map with the set of graphs and map of application stages used in the graphs
func PublicGraphs ¶
func PublicGraphs() *Graphline
PublicGraphs : return the graphline that was published
func (*Graphline) PublishGraphs ¶
func (g *Graphline) PublishGraphs()
PublishGraphs : publish the graphline if needed elsewhere (subgraph execution stage)
func (*Graphline) RegisterAspect ¶
func (g *Graphline) RegisterAspect(graphid string, action AspectAction, stage func(*State, *Payload) error, newasp *Aspect) error
RegisterAspect : register an application aspect function for use in a graph
func (*Graphline) RegisterStage ¶
RegisterStage : register an application stage function for use in a graph
func (*Graphline) RunAspects ¶
func (g *Graphline) RunAspects(name string, mesg []byte, scope *Scope, asp map[string]*Aspect) error
RunAspects : run the aspects for a graph stage
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser : represents a parser.
type Payload ¶
type Payload struct { Raw []byte Data interface{} }
Payload : graph stage payload type
func (*Payload) Append ¶
Append : deep append the src payload to the destination payload. Data field must be map or slice
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner : lexical scanner
func NewScanner ¶
NewScanner : create a new instance of Scanner
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
Stage : graph execution stage type
type State ¶
type State struct {
// contains filtered or unexported fields
}
State : graph stage state type