Documentation
¶
Overview ¶
* aml-jens * * (C) 2023 Deutsche Telekom AG * * Deutsche Telekom AG and all other contributors / * copyright owners license this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
Index ¶
- Variables
- func AbsInt(a int) int
- func ByteCompare(a []byte, b []byte) bool
- func FloorToInt(a float64) int
- func FormatLabelISO(nbr float64) string
- func FormatLabelISOKilo(nbr float64) string
- func FormatLabelISOShorter(nbr float64) string
- func IsDirectory(path string) (bool, error)
- func IsFileAndExecutable(path string) (bool, error)
- func IterateTagName(name string) string
- func MaxInt(a int, b int) int
- func MinInt(a int, b int) int
- func RemoveWhiteSpace(str string) string
- func RetrieveMostLikelyGatewayIp() string
- type ErrorLevel
- type IndentedWriter
- func (i *IndentedWriter) Indent(show_vertical_line bool)
- func (i *IndentedWriter) UnIndent()
- func (i *IndentedWriter) WriteCloseIndent(msg string) (n int, err error)
- func (i *IndentedWriter) WriteFirst(msg string) (n int, err error)
- func (i *IndentedWriter) WriteNoIndent(msg string) (n int, err error)
- func (i *IndentedWriter) WriteNormal(msg string) (n int, err error)
- func (i *IndentedWriter) WriteNormalLines(msgs []string) (n int, err error)
- type RoutineReport
Constants ¶
This section is empty.
Variables ¶
var DEBUG, INFO, WARN, FATAL = logging.GetLogger()
Functions ¶
func ByteCompare ¶
Compares each entrie of a and b Returns true only if a and be are of equal length AND have equal values
func FloorToInt ¶
func FormatLabelISO ¶
Format float64 to a ISO labeld nubmer with max 2 decimals
func FormatLabelISOKilo ¶
Format a number that already contains 1000*
func FormatLabelISOShorter ¶
Format float64 to a ISO labeld nubmer with max 1 decimal
func IsDirectory ¶
func IsFileAndExecutable ¶
func IterateTagName ¶
Iterate a name, adding (number) to it. Increment (number) if already has suffix. If it cant increment: returns 'random' base64 string
func RemoveWhiteSpace ¶
func RetrieveMostLikelyGatewayIp ¶
func RetrieveMostLikelyGatewayIp() string
Returns educated guess, on which ip the grafana is reachable
Types ¶
type IndentedWriter ¶
type IndentedWriter struct {
// contains filtered or unexported fields
}
func NewIndentWirter ¶
func NewIndentWirter() *IndentedWriter
func (*IndentedWriter) Indent ¶
func (i *IndentedWriter) Indent(show_vertical_line bool)
func (*IndentedWriter) UnIndent ¶
func (i *IndentedWriter) UnIndent()
func (*IndentedWriter) WriteCloseIndent ¶
func (i *IndentedWriter) WriteCloseIndent(msg string) (n int, err error)
func (*IndentedWriter) WriteFirst ¶
func (i *IndentedWriter) WriteFirst(msg string) (n int, err error)
func (*IndentedWriter) WriteNoIndent ¶
func (i *IndentedWriter) WriteNoIndent(msg string) (n int, err error)
func (*IndentedWriter) WriteNormal ¶
func (i *IndentedWriter) WriteNormal(msg string) (n int, err error)
func (*IndentedWriter) WriteNormalLines ¶
func (i *IndentedWriter) WriteNormalLines(msgs []string) (n int, err error)
type RoutineReport ¶
type RoutineReport struct { Wg *sync.WaitGroup On_extern_exit_c chan uint8 //This channel should be used, in the event of a fatal-ish error Send_error_c chan struct { Err error Level ErrorLevel } //This channel should be used, if and only if some goroutine markes the application as finished Application_has_finished chan string // contains filtered or unexported fields }
func (RoutineReport) Report ¶
func (r RoutineReport) Report(err error, level ErrorLevel)
func (RoutineReport) ReportFatal ¶
func (r RoutineReport) ReportFatal(err error)
func (RoutineReport) ReportInfo ¶
func (r RoutineReport) ReportInfo(err error)
func (RoutineReport) ReportWarn ¶
func (r RoutineReport) ReportWarn(err error)