MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / NewClientDriver

Function NewClientDriver

gateway/apinto/client.go:68–82  ·  view source on GitHub ↗
(cfg *gateway.ClientConfig)

Source from the content-addressed store, hash-verified

66}
67
68func NewClientDriver(cfg *gateway.ClientConfig) (*ClientDriver, error) {
69 address := make([]string, 0, len(cfg.Addresses))
70 for _, addr := range cfg.Addresses {
71 addr = strings.TrimPrefix(addr, "http://")
72 addr = strings.TrimPrefix(addr, "https://")
73 address = append(address, addr)
74 }
75 client, err := admin_client.New(address...)
76 if err != nil {
77 return nil, err
78 }
79 return &ClientDriver{
80 client: client,
81 }, nil
82}
83
84func genWorkerID(id string, profession string) string {
85

Callers 1

CreateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected