diff --git a/registry/client_test.go b/registry/client_test.go deleted file mode 100644 index 9a76f69..0000000 --- a/registry/client_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package registry - -import ( - "fmt" - "github.com/aviate-labs/agent-go/principal" - "testing" -) - -var client, _ = New() - -func TestClient_GetNodeList(t *testing.T) { - nodes, err := client.GetNodeList() - if err != nil { - t.Fatal(err) - } - if len(nodes) == 0 { - t.Fatal("no nodes") - } - for _, node := range nodes { - fmt.Println(node.GetXnet(), principal.Principal{Raw: node.NodeOperatorId}) - } -} - -func TestClient_GetSubnetIDs(t *testing.T) { - subnetIDs, err := client.GetSubnetIDs() - if err != nil { - t.Fatal(err) - } - if len(subnetIDs) == 0 { - t.Fatal("no subnet IDs") - } - subnetID := subnetIDs[0] - if _, err := client.GetSubnetDetails(subnetID); err != nil { - t.Fatal(err) - } -} diff --git a/registry/dataprovider_test.go b/registry/dataprovider_test.go deleted file mode 100644 index 47550a3..0000000 --- a/registry/dataprovider_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package registry - -import ( - "testing" -) - -func TestDataProvider_GetChangesSince(t *testing.T) { - dp, err := NewDataProvider() - if err != nil { - t.Fatal(err) - } - if _, _, err = dp.GetChangesSince(0); err != nil { - t.Fatal(err) - } -} - -func TestDataProvider_GetLatestVersion(t *testing.T) { - dp, err := NewDataProvider() - if err != nil { - t.Fatal(err) - } - if _, err = dp.GetLatestVersion(); err != nil { - t.Fatal(err) - } -} diff --git a/registry/go.sum b/registry/go.sum deleted file mode 100644 index 1f83d6f..0000000 --- a/registry/go.sum +++ /dev/null @@ -1,20 +0,0 @@ -github.com/aviate-labs/agent-go v0.4.3 h1:XvUv23dw/77I5Rt6S89fHOuI9ci9ARiyLw8Lh4C2FTU= -github.com/aviate-labs/agent-go v0.4.3/go.mod h1:uodw1LlLrP5A5XxXaNOE39iHYb6IGDqnVXEvwiG+YiM= -github.com/aviate-labs/agent-go v0.4.4-0.20240515111542-ef8ce13f44f2 h1:4WA9qGa4z22TSJ6LApbRXtb/ZpeLkxgaKBOvu72srno= -github.com/aviate-labs/agent-go v0.4.4-0.20240515111542-ef8ce13f44f2/go.mod h1:uodw1LlLrP5A5XxXaNOE39iHYb6IGDqnVXEvwiG+YiM= -github.com/aviate-labs/leb128 v0.3.0 h1:s9htRv3OYk8nuHqJu9PiVFJxv1jIUTIcpEeiURa91uQ= -github.com/aviate-labs/leb128 v0.3.0/go.mod h1:GclhBOjhIKmcDlgHKhj0AEZollzERfZUbcRUKiQVqgY= -github.com/aviate-labs/secp256k1 v0.0.0-5e6736a h1:aQkG/D+l8Y7tr809l8pN+KebH2jzacWReSFQmeEKFgM= -github.com/aviate-labs/secp256k1 v0.0.0-5e6736a/go.mod h1:C/lr3F9TimrVkdZckG5mz+VU0TrmpeyVKUjzv2YyGwA= -github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA= -github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/herumi/bls-go-binary v1.33.0 h1:OJwWkXTsxF7SLHT8cBLJfb6i97KHfrG4DkgejLcDm78= -github.com/herumi/bls-go-binary v1.33.0/go.mod h1:O4Vp1AfR4raRGwFeQpr9X/PQtncEicMoOe6BQt1oX0Y= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/registry/proto/v1/local.pb.go b/registry/proto/v1/local.pb.go index 45b9a9a..359b857 100644 --- a/registry/proto/v1/local.pb.go +++ b/registry/proto/v1/local.pb.go @@ -430,6 +430,7 @@ func (x MutationType) Enum() *MutationType { *p = x return p } + // Deprecated: Use MutationType.Descriptor instead. func (MutationType) EnumDescriptor() ([]byte, []int) { return file_local_proto_rawDescGZIP(), []int{0} diff --git a/registry/proto/v1/operator.pb.go b/registry/proto/v1/operator.pb.go index 13a63a9..2daeb27 100644 --- a/registry/proto/v1/operator.pb.go +++ b/registry/proto/v1/operator.pb.go @@ -83,6 +83,57 @@ var file_operator_proto_rawDesc = []byte{ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } +func file_operator_proto_init() { + if File_operator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_operator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeOperatorRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_operator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveNodeOperatorsPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_operator_proto_msgTypes[0].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_operator_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_operator_proto_goTypes, + DependencyIndexes: file_operator_proto_depIdxs, + MessageInfos: file_operator_proto_msgTypes, + }.Build() + File_operator_proto = out.File + file_operator_proto_rawDesc = nil + file_operator_proto_goTypes = nil + file_operator_proto_depIdxs = nil +} + func file_operator_proto_rawDescGZIP() []byte { file_operator_proto_rawDescOnce.Do(func() { file_operator_proto_rawDescData = protoimpl.X.CompressGZIP(file_operator_proto_rawDescData) @@ -90,6 +141,8 @@ func file_operator_proto_rawDescGZIP() []byte { return file_operator_proto_rawDescData } +func init() { file_operator_proto_init() } + // A record for a node operator. Each node operator is associated with a // unique principal id, a.k.a. NOID. // @@ -212,9 +265,7 @@ func (x *RemoveNodeOperatorsPayload) GetNodeOperatorsToRemove() [][]byte { } return nil } - func (*RemoveNodeOperatorsPayload) ProtoMessage() {} - func (x *RemoveNodeOperatorsPayload) ProtoReflect() protoreflect.Message { mi := &file_operator_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { @@ -226,6 +277,7 @@ func (x *RemoveNodeOperatorsPayload) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } + func (x *RemoveNodeOperatorsPayload) Reset() { *x = RemoveNodeOperatorsPayload{} if protoimpl.UnsafeEnabled { @@ -237,55 +289,3 @@ func (x *RemoveNodeOperatorsPayload) Reset() { func (x *RemoveNodeOperatorsPayload) String() string { return protoimpl.X.MessageStringOf(x) } - -func init() { file_operator_proto_init() } -func file_operator_proto_init() { - if File_operator_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_operator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeOperatorRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_operator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveNodeOperatorsPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_operator_proto_msgTypes[0].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_operator_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_operator_proto_goTypes, - DependencyIndexes: file_operator_proto_depIdxs, - MessageInfos: file_operator_proto_msgTypes, - }.Build() - File_operator_proto = out.File - file_operator_proto_rawDesc = nil - file_operator_proto_goTypes = nil - file_operator_proto_depIdxs = nil -}