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

Function newNetworkChannelsCommand

internal/cli/network.go:195–219  ·  view source on GitHub ↗
(deps commandDeps, workspaceRef *string)

Source from the content-addressed store, hash-verified

193}
194
195func newNetworkChannelsCommand(deps commandDeps, workspaceRef *string) *cobra.Command {
196 cmd := &cobra.Command{
197 Use: networkChannelsKey,
198 Short: "List active runtime channels",
199 RunE: func(cmd *cobra.Command, _ []string) error {
200 client, err := clientFromDeps(deps)
201 if err != nil {
202 return err
203 }
204 workspace, err := resolveNetworkWorkspaceRef(cmd, deps, client, workspaceRef)
205 if err != nil {
206 return err
207 }
208
209 channels, err := client.NetworkChannels(cmd.Context(), workspace)
210 if err != nil {
211 return err
212 }
213 return writeCommandOutput(cmd, networkChannelsBundle(channels))
214 },
215 }
216 cmd.AddCommand(newNetworkChannelsCreateCommand(deps, workspaceRef))
217 cmd.AddCommand(newNetworkChannelsUpdateCommand(deps, workspaceRef))
218 return cmd
219}
220
221type networkCreateChannelFlags struct {
222 channel string

Callers 1

newNetworkCommandFunction · 0.85

Calls 7

clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
networkChannelsBundleFunction · 0.85
NetworkChannelsMethod · 0.65

Tested by

no test coverage detected