MCPcopy
hub / github.com/lxc/incus / HasExtension

Method HasExtension

client/incus_server.go:63–71  ·  view source on GitHub ↗

HasExtension returns true if the server supports a given API extension. Deprecated: Use CheckExtension instead.

(extension string)

Source from the content-addressed store, hash-verified

61// HasExtension returns true if the server supports a given API extension.
62// Deprecated: Use CheckExtension instead.
63func (r *ProtocolIncus) HasExtension(extension string) bool {
64 // If no cached API information, just assume we're good
65 // This is needed for those rare cases where we must avoid a GetServer call
66 if r.server == nil {
67 return true
68 }
69
70 return slices.Contains(r.server.APIExtensions, extension)
71}
72
73// CheckExtension checks if the server has the specified extension.
74func (r *ProtocolIncus) CheckExtension(extensionName string) error {

Callers 15

GetClusterMethod · 0.95
UpdateClusterMethod · 0.95
DeleteClusterMemberMethod · 0.95
GetClusterMemberNamesMethod · 0.95
GetClusterMembersMethod · 0.95
GetClusterMemberMethod · 0.95
UpdateClusterMemberMethod · 0.95
RenameClusterMemberMethod · 0.95
CreateClusterMemberMethod · 0.95

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected