MCPcopy Create free account
hub / github.com/compozy/agh / CreateNetworkChannel

Method CreateNetworkChannel

internal/cli/client.go:1884–1911  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspaceRef string,
	request CreateNetworkChannelRequest,
)

Source from the content-addressed store, hash-verified

1882}
1883
1884func (c *unixSocketClient) CreateNetworkChannel(
1885 ctx context.Context,
1886 workspaceRef string,
1887 request CreateNetworkChannelRequest,
1888) (NetworkChannelDetailRecord, error) {
1889 var response contract.CreateNetworkChannelResponse
1890 path, err := networkBasePath(workspaceRef)
1891 if err != nil {
1892 return NetworkChannelDetailRecord{}, err
1893 }
1894 body := struct {
1895 Channel string `json:"channel"`
1896 Purpose string `json:"purpose"`
1897 FanoutPolicy string `json:"fanout_policy,omitempty"`
1898 CoordinatorPeerID string `json:"coordinator_peer_id,omitempty"`
1899 AgentNames []string `json:"agent_names"`
1900 }{
1901 Channel: request.Channel,
1902 Purpose: request.Purpose,
1903 FanoutPolicy: request.FanoutPolicy,
1904 CoordinatorPeerID: request.CoordinatorPeerID,
1905 AgentNames: request.AgentNames,
1906 }
1907 if err := c.doJSON(ctx, http.MethodPost, path+"/channels", nil, body, &response); err != nil {
1908 return NetworkChannelDetailRecord{}, err
1909 }
1910 return response.Channel, nil
1911}
1912
1913func (c *unixSocketClient) UpdateNetworkChannel(
1914 ctx context.Context,

Callers 1

Calls 2

doJSONMethod · 0.95
networkBasePathFunction · 0.85

Tested by 1