operations

package
v0.0.0-...-58f07da Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Index

Examples

Constants

View Source
const (
	AgentName = "common:sql:agent/operations/postgres"
)

Variables

View Source
var (
	Agent messaging.Agent
)

Functions

func ConfigClient

func ConfigClient(cfg map[string]string) error

func ConfigLogging

func ConfigLogging(log func(start time.Time, duration time.Duration, route string, req any, resp any, timeout time.Duration))
Example
/*
	private.FuncLogging(func(start time.Time, duration time.Duration, req any, resp any, timeout time.Duration) {
		fmt.Printf("test: ConfigLogging() -> %v\n", "logging direct invoke")
	})
	private.FuncLogging2(func(start time.Time, duration time.Duration, req any, resp any, timeout time.Duration) {
		fmt.Printf("test: ConfigLogging() -> %v\n", "logging direct invoke 2")
	})

	m := messaging.NewConfigMessage(func(start time.Time, duration time.Duration, req any, resp any, timeout time.Duration) {
		fmt.Printf("test: ConfigLogging() -> %v\n", "logging message invoke")
	})
	private.MessageLogging(m)

	private.MessageLogging2(m)

	var fn private.LogFunc2
	fn = func(start time.Time, duration time.Duration, req any, resp any, timeout time.Duration) {
		fmt.Printf("test: ConfigLogging() -> %v\n", "logging message invoke func")
	}
	m = messaging.NewConfigMessage(fn)
	private.MessageLogging2(m)

*/

fmt.Printf("test: ConfigLogging()\n")
Output:
test: ConfigLogging()

func ConfigSourceOverride

func ConfigSourceOverride()
Example
name := "test:customer:type/address1"

ConfigSourceOverride()
r, err := request.Requester.Execute(nil, name, "insert", &addressT{
	City:  "Frisco",
	State: "TX",
	Zip:   "75035",
})
fmt.Printf("test: Requester.Execute() %v [err:%v]\n", r, err)

buf, err1 := retrieval.Retriever.Marshal(nil, name, "get", nil)
fmt.Printf("test: Retriever.Marshal() %v [err:%v]\n", string(buf.Bytes()), err1)

buf, err1 = retrieval.Retriever.Marshal(nil, "invalid", "get", nil)
fmt.Printf("test: Retriever.Marshal() %v [err:%v]\n", buf, err1)
Output:
test: Requester.Execute() { 1 true false false false} [err:<nil>]
test: Retriever.Marshal() {"City":"Frisco","State":"TX","Zip":"75035"} [err:<nil>]
test: Retriever.Marshal() <nil> [err:<nil>]

func Shutdown

func Shutdown()

func Startup

func Startup()

Types

This section is empty.

Jump to

Keyboard shortcuts

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