Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
type Backoff interface { // NextBackOff provides the duration expected to wait before retrying an // action. time.Duration = -1 indicates that no more retry should be // attempted. NextBackOff() time.Duration // Reset sets the backoff back to its initial state. Reset() }
Backoff represents the object managing backoff algorithms to retry actions.
type Context ¶
type Context interface { // Clone returns an exact copy of the current context. The only exception of // copied fields is the context ID, which must be unique for each context. Clone() Context context.Context // GetBehaviourID returns the behaviour ID of the current context. This // behaviour ID represents the behaviour currently being executed. That way CLGs // can identify themself. The second return value expresses the existence of // the key requested. GetBehaviourID() (string, bool) // GetCLGName returns the CLG name of the current context. GetCLGName() (string, bool) // GetCLGTreeID returns the CLG tree ID of the current context. The second // return value expresses the existence of the key requested. GetCLGTreeID() (string, bool) // GetExpectation returns the expectation of the current context. The second // return value expresses the existence of the key requested. GetExpectation() (Expectation, bool) // GetID returns the context's ID representing the very unique scope of its // own lifetime. This can be useful for e.g. gathering logs bound to one // request going through multiple independent sub-systems. GetID() string // GetInformationID returns the information ID of the current context. This // information ID represents the information sequence of the original user // input. The second return value expresses the existence of the key // requested. GetInformationID() (string, bool) // GetSessionID returns the session ID of the current context. The second // return value expresses the existence of the key requested. GetSessionID() (string, bool) json.Marshaler json.Unmarshaler // SetBehaviourID sets the given behaviour ID to the current context. SetBehaviourID(behaviourID string) // SetCLGName sets the CLG name of the current context. SetCLGName(clgName string) // SetCLGTreeID sets the given CLG tree ID to the current context. SetCLGTreeID(clgTreeID string) // SetExpectation sets the given expectation to the current context. SetExpectation(expectation Expectation) // SetInformationID sets the given information ID to the current context. SetInformationID(informationID string) // SetSessionID sets the given session ID to the current context. SetSessionID(sessionID string) }
Context represents a container holding scope specific information.
type Expectation ¶
type Expectation interface { // GetOutput returns the configured output of the expectation. This output // represents the output which is expected to be calculated by the neural // network. GetOutput() string }
Expectation represents a description of what output is to be expected when requesting calculations by providing some input.
type Feature ¶
type Feature interface { // AddPosition provides a way to add more positions to the initialized // feature. Note positions are vectors in distribution terms. AddPosition(position []float64) error // Count returns the number of occurrences within analysed sequences. That is, // how often this feature was found. Technically spoken, // len(feature.Positions). Count() int // Positions returns the feature's configured positions. Positions() [][]float64 // Sequence returns the sequence that represents this feature. This is the // sub-sequence, the charactistic detected within analysed sequences. Sequence() string SetPositions(positions [][]float64) SetSequence(sequence string) }
Feature represents a charactistic within a sequence. During pattern recognition it is tried to detect features. Their distributions describe location patterns within space.
type InstrumentorCounter ¶
type InstrumentorCounter interface { // IncrBy increments the current counter by the given delta. IncrBy(delta float64) }
InstrumentorCounter is a metric that can be arbitrarily incremented.
type InstrumentorGauge ¶
type InstrumentorGauge interface { // DecrBy decrements the current gauge by the given delta. DecrBy(delta float64) // IncrBy increments the current gauge by the given delta. IncrBy(delta float64) }
InstrumentorGauge is a metric that can be arbitrarily incremented or decremented.
type InstrumentorHistogram ¶
type InstrumentorHistogram interface { // Observe tracks the given sample used for aggregation of the current // histogramm. Observe(sample float64) }
InstrumentorHistogram is a metric to observe samples over time.
type NetworkPayload ¶
type NetworkPayload interface { // GetArgs returns the arguments of the current network payload. GetArgs() []reflect.Value // GetCLGInput returns a list of arguments intended to be provided as input // for a CLG's execution. The list of arguments exists of the arguments // configured to the network payload and the context configured to the network // payload. Note that the context is always the first argument in the list. GetCLGInput() []reflect.Value // GetContext returns the context of the current network payload. GetContext() Context // GetArgs returns the destination of the current network payload, which must // be the ID of a CLG registered within the neural network. GetDestination() string // GetID returns the object ID of the current network payload. GetID() string // GetArgs returns the sources of the current network payload, which must be // the ID of a CLG registered within the neural network. One allowed exception // is the very first source of the very first network payload, which is // created within the network when user input is received to forward it to the // input CLG. GetSources() []string json.Marshaler json.Unmarshaler // SetArgs sets the arguments of the current network payload. SetArgs(args []reflect.Value) // String returns the concatenated string representations of the currently // configured arguments. String() string }
NetworkPayload represents the data container carried around within the neural network.
type PermutationList ¶
type PermutationList interface { // Indizes returns the list's current indizes. Indizes() []int // MaxGrowth returns the list's configured growth limit. The growth limit // is used to prevent infinite permutations. E.g. MaxGrowth set to 4 will not // permute up to a list of 5 raw values. MaxGrowth() int // PermutedValues returns the list's permuted values. PermutedValues() []interface{} // RawValues returns the list's unpermuted raw values. RawValues() []interface{} // SetIndizes sets the given indizes of the current permutation list. SetIndizes(indizes []int) SetMaxGrowth(maxGrowth int) SetRawValues(rawValues []interface{}) }
PermutationList is supposed to be permuted by a permutation service.
type TextInput ¶
type TextInput interface { // Echo returns the echo flag of the current text request. Echo() bool // Expectation returns the expectation of the current text request. Expectation() Expectation // Input returns the input of the current text request. Input() string // SessionID returns the session ID of the current text request. SessionID() string SetEcho(echo bool) SetExpectation(expectation Expectation) SetInput(input string) SetSessionID(sessionID string) }
TextInput represents a streamed request being send to the neural network. This is basically good for requesting calculations from the neural network by providing text input and an optional expectation object.
type TextOutput ¶
type TextOutput interface { // Output returns the output of the current text response. Output() string SetOutput(output string) }
TextOutput represents a streamed response being send to the client. This is basically good for responding calculated output of the neural network.
type WorkerExecuteConfig ¶
type WorkerExecuteConfig interface { Actions() []func(canceler <-chan struct{}) error Canceler() chan struct{} CancelOnError() bool NumWorkers() int SetActions(actions []func(canceler <-chan struct{}) error) SetCanceler(canceler chan struct{}) SetCancelOnError(cancelOnError bool) SetNumWorkers(numWorkers int) }