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

Function bridgeRoutingPolicyForUpdate

internal/cli/bridge.go:382–403  ·  view source on GitHub ↗
(
	cmd *cobra.Command,
	client DaemonClient,
	id string,
	flags bridgeUpdateFlags,
)

Source from the content-addressed store, hash-verified

380}
381
382func bridgeRoutingPolicyForUpdate(
383 cmd *cobra.Command,
384 client DaemonClient,
385 id string,
386 flags bridgeUpdateFlags,
387) (bridgepkg.RoutingPolicy, error) {
388 current, err := client.GetBridge(cmd.Context(), id)
389 if err != nil {
390 return bridgepkg.RoutingPolicy{}, err
391 }
392 policy := current.RoutingPolicy
393 if cmd.Flags().Changed("include-peer") {
394 policy.IncludePeer = flags.includePeer
395 }
396 if cmd.Flags().Changed("include-thread") {
397 policy.IncludeThread = flags.includeThread
398 }
399 if cmd.Flags().Changed("include-group") {
400 policy.IncludeGroup = flags.includeGroup
401 }
402 return policy, nil
403}
404
405func bridgeDeliveryDefaultsForUpdate(
406 rawValue string,

Callers 1

buildBridgeUpdateRequestFunction · 0.85

Calls 1

GetBridgeMethod · 0.65

Tested by

no test coverage detected