MCPcopy Create free account
hub / github.com/dim-an/cod / NewClient

Function NewClient

server/client.go:42–52  ·  view source on GitHub ↗
(configuration Configuration)

Source from the content-addressed store, hash-verified

40}
41
42func NewClient(configuration Configuration) (client *Client, err error) {
43 conn, err := dial("unix", configuration.GetSocketFile())
44 if err != nil {
45 return
46 }
47 client = &Client{
48 conn: conn,
49 reader: bufio.NewReader(conn),
50 }
51 return
52}
53
54func (c *Client) Request(req interface{}, rsp interface{}) (err error) {
55 reqString := MarshalRequest(req)

Callers 3

learnMainFunction · 0.92
shellApiAttachMainFunction · 0.92
ClientMethod · 0.92

Calls 2

dialFunction · 0.85
GetSocketFileMethod · 0.80

Tested by

no test coverage detected