Skip to content
Discussion options

You must be logged in to vote

You don't need to do any type casting or anything like that.

Once you set up a client, you can do something close to:

items, err := safe.StateListAll[*cluster.Member](nodeCtx, suite.Client.COSI)
suite.Require().NoError(err)
return safe.ToSlice(items, func(m *cluster.Member) *cluster.Member { return m })
}
func (suite *DiscoverySuite) getNodeIdentity(nodeCtx context.Context) *cluster.Identity {
identity, err := safe.StateGet[*cluster.Identity](nodeCtx, suite.Client.COSI, resource.NewMetadata(cluster.NamespaceName, cluster.IdentityType, cluster.LocalIdentity, resource.Versi…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@andrewbaxter
Comment options

@smira
Comment options

@andrewbaxter
Comment options

Answer selected by andrewbaxter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants