-
Notifications
You must be signed in to change notification settings - Fork 16
Add support to get channel lifecycle status #362
Copy link
Copy link
Closed
Labels
enhancementNew feature or improved functionality.New feature or improved functionality.
Description
Add support to get channel lifecycle status
Channel lifecycle status is described at [Channel status / REST / [Docs]|https://ably.com/docs/rest/channel-status#metadata-rest]
It is currently possible to retrieve channel lifecycle status in ably-go by using REST.Request and marshalling the result into a slice of empty interface.
Example:
result, _ := restClient.Request("get", "/channels/test").Pages(context.Background())
result.Next(ctx)
var items []interface{}
if err := result.Items(&items); err != nil {
fmt.Println(err)
}
fmt.Printf("%+v\n", items)
// [map[channelId:test name:test status:map[isActive:true occupancy:map[metrics:map[connections:1 presenceConnections:1 presenceMembers:1 presenceSubscribers:1 publishers:1 subscribers:1]]]]]Out of Scope
Realtime subscription to Channel Lifecycle Events. This ticket is only for supporting REST client ‘Get’.
Please see this PR for more information https://github.com/ably/docs/pull/1415
┆Issue is synchronized with this Jira Story by Unito
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improved functionality.New feature or improved functionality.