MCPcopy
hub / github.com/olric-data/olric / NewClient

Function NewClient

config/client.go:110–119  ·  view source on GitHub ↗

NewClient returns a new configuration object for clients.

()

Source from the content-addressed store, hash-verified

108
109// NewClient returns a new configuration object for clients.
110func NewClient() *Client {
111 c := &Client{
112 Authentication: &Authentication{},
113 }
114 err := c.Sanitize()
115 if err != nil {
116 panic(fmt.Sprintf("failed to create a new client configuration: %v", err))
117 }
118 return c
119}
120
121// Sanitize sets default values to empty configuration variables, if it's possible.
122func (c *Client) Sanitize() error {

Callers 8

NewClusterClientFunction · 0.92
TestServer_Client_GetFunction · 0.92
TestServer_Client_PickFunction · 0.92
TestServer_Client_CloseFunction · 0.92
NewClientFunction · 0.92
SanitizeMethod · 0.70

Calls 1

SanitizeMethod · 0.95

Tested by 5

TestServer_Client_GetFunction · 0.74
TestServer_Client_PickFunction · 0.74
TestServer_Client_CloseFunction · 0.74