diff --git a/alert/topics.go b/alert/topics.go index 3d08b3045e..2782c11c03 100644 --- a/alert/topics.go +++ b/alert/topics.go @@ -86,13 +86,13 @@ func (s *Topics) RestoreTopics() { } } -func (s *Topics) UpdateEvent(id string, event EventState) { +func (s *Topics) UpdateEvent(topicID string, event EventState) { + s.mu.Lock() defer s.mu.Unlock() - t, ok := s.topics[id] + t, ok := s.topics[topicID] if !ok { - t = s.newTopic(id) - s.topics[id] = t + s.topics[topicID] = s.newTopic(topicID) } t.updateEvent(event) } @@ -124,7 +124,6 @@ func (s *Topics) Collect(event Event) error { } s.mu.Unlock() } - return topic.collect(event) } @@ -347,16 +346,19 @@ func (t *Topic) close() { } func (t *Topic) collect(event Event) error { + prev, ok := t.updateEvent(event.State) if ok { event.previousState = prev } t.collected.Add(1) + return t.handleEvent(event) } func (t *Topic) handleEvent(event Event) error { + t.mu.RLock() defer t.mu.RUnlock() @@ -406,6 +408,7 @@ func (t *Topic) updateEvent(state EventState) (EventState, bool) { type sortedStates []*EventState +// TODO(docmerlin): replaced sortedStates with a heap or something similar func (e sortedStates) Len() int { return len(e) } func (e sortedStates) Swap(i int, j int) { e[i], e[j] = e[j], e[i] } func (e sortedStates) Less(i int, j int) bool { diff --git a/build.py b/build.py index 77dc804988..0bdec206b6 100755 --- a/build.py +++ b/build.py @@ -211,13 +211,8 @@ def run_tests(race, parallel, timeout, verbose): test_command += " -timeout {}".format(timeout) test_command += " ./..." logging.info("Running tests...") - - packages = run("go list ./...").split("\n") - print(packages) logging.info("Test command: " + test_command) - for package in packages: - run(test_command + " " + package, printOutput=logging.getLogger().getEffectiveLevel() == logging.DEBUG) - + output = run(test_command, printOutput=logging.getLogger().getEffectiveLevel() == logging.DEBUG) return True def package_udfs(version, dist_dir): diff --git a/server/server.go b/server/server.go index d7923dc147..9a3df6ea6a 100644 --- a/server/server.go +++ b/server/server.go @@ -1135,7 +1135,6 @@ func (s *Server) startServices() error { return fmt.Errorf("open service %T: %s", service, err) } s.Diag.Debug("opened service", keyvalue.KV("service", fmt.Sprintf("%T", service))) - // Apply config overrides after the config override service has been opened and before any dynamic services. if service == s.ConfigOverrideService && !s.config.SkipConfigOverrides && s.config.ConfigOverride.Enabled { // Apply initial config updates diff --git a/server/server_test.go b/server/server_test.go index 2c3c0f8c3f..3f4cb17448 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -2857,7 +2857,6 @@ test value=1 0000000011 func TestServer_UpdateTaskID(t *testing.T) { s, cli := OpenDefaultServer(t) defer s.Close() - println("here") id := "testTaskID" ttype := client.StreamTask dbrps := []client.DBRP{ @@ -9990,70 +9989,70 @@ func TestServer_AlertHandlers_CRUD(t *testing.T) { }, } for _, tc := range testCases { - // Create default config - c := NewConfig(t) - s := OpenServer(c) - cli := Client(s) - defer s.Close() - - h, err := cli.CreateTopicHandler(cli.TopicHandlersLink(tc.topic), tc.create) - if err != nil { - t.Fatal(err) - } - - if !reflect.DeepEqual(h, tc.expCreate) { - t.Errorf("unexpected handler created:\ngot\n%#v\nexp\n%#v\n", h, tc.expCreate) - } - - h, err = cli.PatchTopicHandler(h.Link, tc.patch) - if err != nil { - t.Fatal(err) - } + t.Run(tc.topic, func(t *testing.T) { + // Create default config + c := NewConfig(t) + s := OpenServer(c) + cli := Client(s) + defer s.Close() + h, err := cli.CreateTopicHandler(cli.TopicHandlersLink(tc.topic), tc.create) + if err != nil { + t.Fatal(err) + } - if !reflect.DeepEqual(h, tc.expPatch) { - t.Errorf("unexpected handler patched:\ngot\n%#v\nexp\n%#v\n", h, tc.expPatch) - } + if !reflect.DeepEqual(h, tc.expCreate) { + t.Errorf("unexpected handler created:\ngot\n%#v\nexp\n%#v\n", h, tc.expCreate) + } - h, err = cli.ReplaceTopicHandler(h.Link, tc.put) - if err != nil { - t.Fatal(err) - } + h, err = cli.PatchTopicHandler(h.Link, tc.patch) + if err != nil { + t.Fatal(err) + } - if !reflect.DeepEqual(h, tc.expPut) { - t.Errorf("unexpected handler put:\ngot\n%#v\nexp\n%#v\n", h, tc.expPut) - } + if !reflect.DeepEqual(h, tc.expPatch) { + t.Errorf("unexpected handler patched:\ngot\n%#v\nexp\n%#v\n", h, tc.expPatch) + } - // Restart server - s.Restart() + h, err = cli.ReplaceTopicHandler(h.Link, tc.put) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(h, tc.expPut) { + t.Errorf("unexpected handler put:\ngot\n%#v\nexp\n%#v\n", h, tc.expPut) + } - rh, err := cli.TopicHandler(h.Link) - if err != nil { - t.Fatalf("could not find handler after restart: %v", err) - } - if got, exp := rh, h; !reflect.DeepEqual(got, exp) { - t.Errorf("unexpected handler after restart:\ngot\n%#v\nexp\n%#v\n", got, exp) - } + // Restart server + s.Restart() - err = cli.DeleteTopicHandler(h.Link) - if err != nil { - t.Fatal(err) - } + rh, err := cli.TopicHandler(h.Link) + if err != nil { + t.Fatalf("could not find handler after restart: %v", err) + } + if got, exp := rh, h; !reflect.DeepEqual(got, exp) { + t.Errorf("unexpected handler after restart:\ngot\n%#v\nexp\n%#v\n", got, exp) + } - _, err = cli.TopicHandler(h.Link) - if err == nil { - t.Errorf("expected handler to be deleted") - } + err = cli.DeleteTopicHandler(h.Link) + if err != nil { + t.Fatal(err) + } - handlers, err := cli.ListTopicHandlers(cli.TopicHandlersLink(tc.topic), nil) - if err != nil { - t.Fatal(err) - } - for _, h := range handlers.Handlers { - if h.ID == tc.expPut.ID { + _, err = cli.TopicHandler(h.Link) + if err == nil { t.Errorf("expected handler to be deleted") - break } - } + + handlers, err := cli.ListTopicHandlers(cli.TopicHandlersLink(tc.topic), nil) + if err != nil { + t.Fatal(err) + } + for _, h := range handlers.Handlers { + if h.ID == tc.expPut.ID { + t.Errorf("expected handler to be deleted") + break + } + } + }) } } @@ -12001,7 +12000,10 @@ stream v := url.Values{} v.Add("precision", "s") s.MustWrite("mydb", "myrp", point, v) + time.Sleep(15 * time.Second) + q, _ := s.AlertService.EventStates("tcp", -1) + _ = q s.Restart() // Check TCP handler got event @@ -12029,9 +12031,8 @@ stream exp := []alert.Data{alertData} got := ts.Data() if !reflect.DeepEqual(exp, got) { - t.Errorf("unexpected tcp request:\nexp\n%+v\ngot\n%+v\n", exp, got) + t.Fatalf("unexpected tcp request:\nexp\n%+v\ngot\n%+v\n", exp, got) } - // Check event on topic l := cli.TopicEventsLink(tcpTopic) expTopicEvents := client.TopicEvents{ @@ -12055,7 +12056,7 @@ stream t.Fatal(err) } if !reflect.DeepEqual(te, expTopicEvents) { - t.Errorf("unexpected topic events for publish topic:\ngot\n%+v\nexp\n%+v\n", te, expTopicEvents) + t.Fatalf("unexpected topic events for publish topic:\ngot\n%+v\nexp\n%+v\n", te, expTopicEvents) } } diff --git a/services/alert/api.go b/services/alert/api.go index b08f2469df..b1986d6db1 100644 --- a/services/alert/api.go +++ b/services/alert/api.go @@ -298,6 +298,7 @@ func (s *apiServer) handleListEvents(topic string, w http.ResponseWriter, r *htt httpd.HttpError(w, fmt.Sprintf("failed to get topic events: %s", err.Error()), true, http.StatusInternalServerError) return } + res := client.TopicEvents{ Link: s.topicEventsLink(topic, client.Self), Topic: topic, diff --git a/services/alert/easyjson-bootstrap2172438621.go b/services/alert/easyjson-bootstrap2172438621.go new file mode 100644 index 0000000000..9dfdf8e365 --- /dev/null +++ b/services/alert/easyjson-bootstrap2172438621.go @@ -0,0 +1,26 @@ +// +build ignore + +// TEMPORARY AUTOGENERATED FILE: easyjson bootstapping code to launch +// the actual generator. + +package main + +import ( + "fmt" + "os" + + "github.com/mailru/easyjson/gen" + + pkg "github.com/influxdata/kapacitor/services/alert" +) + +func main() { + g := gen.NewGenerator("dao_easyjson.go") + g.SetPkg("alert", "github.com/influxdata/kapacitor/services/alert") + g.Add(pkg.EasyJSON_exporter_EventState(nil)) + g.Add(pkg.EasyJSON_exporter_TopicState(nil)) + if err := g.Run(os.Stdout); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/services/alert/service.go b/services/alert/service.go index cdb6b38df7..477f13e745 100644 --- a/services/alert/service.go +++ b/services/alert/service.go @@ -182,12 +182,13 @@ const ( topicStatesAPIName = "topic-states" // The storage namespace for all task data. alertNamespace = "alert_store" + // The storage namespace for topic states + topicStatesNameSpace = "topic_states_store" ) func (s *Service) Open() error { s.mu.Lock() defer s.mu.Unlock() - // Create DAO store := s.StorageService.Store(alertNamespace) specsDAO, err := newHandlerSpecKV(store) @@ -196,9 +197,8 @@ func (s *Service) Open() error { } s.specsDAO = specsDAO s.StorageService.Register(handlerSpecsAPIName, s.specsDAO) - s.topicsStore = store - //TODO(docmerlin): FIX NEXT LINE - //s.StorageService.Register(topicStatesAPIName, s.topicsDAO) + s.topicsStore = s.StorageService.Store(topicStatesNameSpace) + // NOTE: since the topics store doesn't use the indexing store, we don't need to register the api // Migrate v1.2 handlers if err := s.migrateHandlerSpecs(store); err != nil { @@ -376,15 +376,16 @@ func (s *Service) loadSavedHandlerSpecs() error { return nil } -func (s *Service) convertEventStatesToAlert(states map[string]EventState) map[string]alert.EventState { - newStates := make(map[string]alert.EventState, len(states)) - for id, state := range states { - newStates[id] = s.convertEventStateToAlert(id, state) - } - return newStates -} -func (s *Service) convertEventStateToAlert(id string, state EventState) alert.EventState { - return alert.EventState{ +//func (s *Service) convertEventStatesToAlert(states map[string]EventState) map[string]alert.EventState { +// newStates := make(map[string]alert.EventState, len(states)) +// for id, state := range states { +// newStates[id] = s.convertEventStateToAlert(id, state) +// } +// return newStates +//} + +func convertEventStateToAlert(id string, state *EventState) *alert.EventState { + return &alert.EventState{ ID: id, Message: state.Message, Details: state.Details, @@ -394,16 +395,8 @@ func (s *Service) convertEventStateToAlert(id string, state EventState) alert.Ev } } -func (s *Service) convertEventStatesFromAlert(states map[string]alert.EventState) map[string]EventState { - newStates := make(map[string]EventState, len(states)) - for id, state := range states { - newStates[id] = s.convertEventStateFromAlert(state) - } - return newStates -} - -func (s *Service) convertEventStateFromAlert(state alert.EventState) EventState { - return EventState{ +func convertEventStateFromAlert(state alert.EventState) *EventState { + return &EventState{ Message: state.Message, Details: state.Details, Time: state.Time, @@ -421,6 +414,7 @@ func (s *Service) loadSavedTopicStates() error { buf := bytes.Buffer{} for _, b := range kv { + if b == nil { continue } @@ -439,7 +433,7 @@ func (s *Service) loadSavedTopicStates() error { if err := lex.Error(); err != nil { return err } - eventstates[b.Key] = es.AlertEventState(b.Key) + eventstates[b.Key] = convertEventStateToAlert(b.Key, es) es.Reset() } s.topics.RestoreTopicNoCopy(b.Key, eventstates) @@ -483,21 +477,17 @@ func (s *Service) persistEventState(event alert.Event) error { if !s.PersistTopics { return nil } + if _, ok := s.topics.Topic(event.Topic); !ok { // Topic was deleted since event was collected, nothing to do. return nil } return s.topicsStore.Update(func(tx storage.Tx) error { + //panic("unfinished") tx = tx.Bucket([]byte(event.Topic)) - data, err := EventState{ - Message: event.State.Message, - Details: event.State.Details, - Time: event.State.Time, - Duration: event.State.Duration, - Level: event.State.Level, - }.MarshalJSON() + data, err := convertEventStateFromAlert(event.State).MarshalJSON() if err != nil { return err } @@ -505,24 +495,6 @@ func (s *Service) persistEventState(event alert.Event) error { }) } -//func (s *Service) persistTopicState(topic string) error { -// if !s.PersistTopics { -// return nil -// } -// -// t, ok := s.topics.Topic(topic) -// if !ok { -// // Topic was deleted since event was collected, nothing to do. -// return nil -// } -// -// ts := TopicState{ -// Topic: topic, -// EventStates: s.convertEventStatesFromAlert(t.EventStates(alert.OK)), -// } -// return s.topicsDAO.Put(ts) -//} - func (s *Service) restoreClosedTopic(topic string) error { s.mu.Lock() defer s.mu.Unlock() @@ -546,7 +518,7 @@ func (s *Service) restoreTopic(topic string) error { if err != nil { return err } - eventstates := make(map[string]*alert.EventState, len(q)) + eventStates := make(map[string]*alert.EventState, len(q)) lex := jlexer.Lexer{} es := &EventState{} //create a buffer to hold the unmarshalled eventstate for _, b := range q { @@ -555,25 +527,16 @@ func (s *Service) restoreTopic(topic string) error { if err := lex.Error(); err != nil { return err } - eventstates[b.Key] = es.AlertEventState(b.Key) + eventStates[b.Key] = es.AlertEventState(b.Key) es.Reset() } - s.topics.RestoreTopicNoCopy(topic, eventstates) + s.topics.RestoreTopicNoCopy(topic, eventStates) return nil }) if err != nil { return err } - //// Restore events state from storage - ////ts, err := s.topicsDAO.Get(topic) - //s.topicsStore.View() - //if err != nil && err != ErrNoTopicStateExists { - // return err - //} else if err != ErrNoTopicStateExists { - // s.topics.RestoreTopic(topic, s.convertEventStatesToAlert(ts.EventStates)) - //} // else nothing to restore - // // Re-Register all handlers for _, h := range s.handlers[topic] { s.topics.RegisterHandler(topic, h.Handler) @@ -750,6 +713,7 @@ func (s *Service) TopicStates(pattern string, minLevel alert.Level) (map[string] // EventState returns the current state of the event. func (s *Service) EventState(topic, event string) (alert.EventState, bool, error) { t, ok := s.topics.Topic(topic) + if !ok { return alert.EventState{}, false, nil } diff --git a/services/storage/bolt.go b/services/storage/bolt.go index 4747014143..d29b4a8909 100644 --- a/services/storage/bolt.go +++ b/services/storage/bolt.go @@ -19,28 +19,43 @@ func NewBolt(db *bolt.DB, bucket ...[]byte) *Bolt { } } -func (b *Bolt) deleteBucket() error { - if len(b.bucket) == 0 { - return nil - } - return b.db.Update(func(tx *bolt.Tx) error { - var bucket *bolt.Bucket - i := 0 - for i = range b.bucket { - bucket = tx.Bucket(b.bucket[i]) - if bucket == nil { - return nil - } +//func (b *Bolt) deleteBucket() error { +// if len(b.bucket) == 0 { +// return nil +// } +// return b.db.Update(func(tx *bolt.Tx) error { +// var bucket *bolt.Bucket +// i := 0 +// for i = range b.bucket { +// bucket = tx.Bucket(b.bucket[i]) +// if bucket == nil { +// return nil +// } +// } +// return tx.DeleteBucket(b.bucket[i]) +// }) +// +//} + +// Bucket tells the Bolt to do following actions in a bucket. A nil bucket will return a *Bolt that is targeted to the root bucket. +func (b *Bolt) Bucket(bucket []byte) *Bolt { + if bucket == nil { + return &Bolt{ + db: b.db, + bucket: nil, } - return tx.DeleteBucket(b.bucket[i]) - }) - + } + return &Bolt{ + db: b.db, + bucket: append(b.bucket, bucket), + } } -func (b *Bolt) Bucket(bucket []byte) *Bolt { +// Bucket tells the Bolt to do following actions in a bucket. A nil bucket will return a *Bolt that is targeted to the root bucket. +func (b *Bolt) Store(buckets ...[]byte) Interface { return &Bolt{ db: b.db, - bucket: append(b.bucket, bucket), + bucket: buckets, } } @@ -53,10 +68,12 @@ func (b *Bolt) Update(f func(tx Tx) error) error { } func (b *Bolt) put(tx *bolt.Tx, key string, value []byte) error { - var bucket *bolt.Bucket - var err error - for i := range b.bucket { - bucket, err = tx.CreateBucketIfNotExists(b.bucket[i]) + bucket, err := tx.CreateBucketIfNotExists(b.bucket[0]) + if err != nil { + return err + } + for _, buckName := range b.bucket[1:] { + bucket, err = bucket.CreateBucketIfNotExists(buckName) if err != nil { return err } @@ -71,12 +88,9 @@ func (b *Bolt) Put(key string, value []byte) error { } func (b *Bolt) get(tx *bolt.Tx, key string) (*KeyValue, error) { - var bucket *bolt.Bucket - for i := range b.bucket { - bucket = tx.Bucket(b.bucket[i]) - if bucket == nil { - return nil, ErrNoKeyExists - } + bucket := b.bucketHelper(tx) + if bucket == nil { + return nil, ErrNoKeyExists } val := bucket.Get([]byte(key)) if val == nil { @@ -98,15 +112,28 @@ func (b *Bolt) Get(key string) (kv *KeyValue, err error) { return } +// Delete removes a key from a bolt. If the key is a bucket, it removes that. func (b *Bolt) delete(tx *bolt.Tx, key string) error { - var bucket *bolt.Bucket - for i := range b.bucket { - bucket = tx.Bucket(b.bucket[i]) - if bucket == nil { - return nil - } + bucket := b.bucketHelper(tx) + if bucket == nil { + return nil + } + cursor := bucket.Cursor() + if cursor == nil { + return nil } - return bucket.Delete([]byte(key)) + // handling for buckets + bkey := []byte(key) + k, v := cursor.Seek(bkey) + if key != string(k) { + return nil + } + if v == nil { + return bucket.DeleteBucket(bkey) + } + // handling for regular keys + return bucket.Delete(bkey) + } func (b *Bolt) Delete(key string) error { @@ -116,14 +143,7 @@ func (b *Bolt) Delete(key string) error { } func (b *Bolt) exists(tx *bolt.Tx, key string) (bool, error) { - var bucket *bolt.Bucket - for i := range b.bucket { - bucket = tx.Bucket(b.bucket[i]) - if bucket == nil { - return false, nil - } - } - + bucket := b.bucketHelper(tx) if bucket == nil { return false, nil } @@ -140,25 +160,53 @@ func (b *Bolt) Exists(key string) (exists bool, err error) { return } -func (b *Bolt) list(tx *bolt.Tx, prefixStr string) (kvs []*KeyValue, err error) { - var bucket *bolt.Bucket - for i := range b.bucket { - bucket = tx.Bucket(b.bucket[i]) +func (b *Bolt) bucketHelper(tx *bolt.Tx) *bolt.Bucket { + if len(b.bucket) == 0 { + return tx.Cursor().Bucket() //grab root bucket + } // get the right bucket + bucket := tx.Bucket(b.bucket[0]) + if bucket == nil { + return nil + } + for _, buckName := range b.bucket[1:] { + bucket = bucket.Bucket(buckName) if bucket == nil { - return + return nil } } + return bucket +} - cursor := bucket.Cursor() - prefix := []byte(prefixStr) +// cursor returns a cursor at the appropriate bucket or nil if that bucket doesn't exist +func (b *Bolt) cursor(tx *bolt.Tx) *bolt.Cursor { + if len(b.bucket) == 0 { + return tx.Cursor() //grab root bucket + } // get the right bucket + bucket := tx.Bucket(b.bucket[0]) + if bucket == nil { + return nil + } + for _, buckName := range b.bucket[1:] { + bucket = bucket.Bucket(buckName) + if bucket == nil { + return nil + } + } + return bucket.Cursor() +} - for key, v := cursor.Seek(prefix); bytes.HasPrefix(key, prefix); key, v = cursor.Next() { - value := make([]byte, len(v)) - copy(value, v) +func (b *Bolt) list(tx *bolt.Tx, prefixStr string) (kvs []*KeyValue, err error) { + cursor := b.cursor(tx) + if cursor == nil { + return nil, nil // no objects returned + } + prefix := []byte(prefixStr) + for key, v := cursor.Seek(prefix); key != nil && bytes.HasPrefix(key, prefix); key, v = cursor.Next() { + // we want to be able to grab buckets AND keys here kvs = append(kvs, &KeyValue{ Key: string(key), - Value: value, + Value: append([]byte(nil), v...), }) } return diff --git a/services/storage/mem.go b/services/storage/mem.go deleted file mode 100644 index b755596c46..0000000000 --- a/services/storage/mem.go +++ /dev/null @@ -1,197 +0,0 @@ -package storage - -//import ( -// "fmt" -// "sort" -// "strings" -// "sync" -//) -// -//// MemStore is an in memory only implementation of the storage.Interface. -//// This is intend to be used for testing use cases only. -//type MemStore struct { -// mu sync.Mutex -// Name string -// store memStoreObj -//} -// -//type memStoreObj interface { -// Children() map[string]memStoreObj -// Data() []byte -//} -// -//type bucket map[string]memStoreObj -// -//func (b bucket) Children() map[string]memStoreObj { -// return b -//} -// -//func (b bucket) Data() []byte { -// return nil -//} -// -//type data []byte -// -//func (b data) Children() map[string][]byte { -// return nil -//} -// -//func (b data) Data() []byte { -// return b -//} -// -//func NewMemStore(name string) *MemStore { -// return &MemStore{ -// Name: name, -// store: make(bucket), -// } -//} -// -//func (s *MemStore) View(f func(tx ReadOnlyTx) error) error { -// return DoView(s, f) -//} -// -//func (s *MemStore) Update(f func(tx Tx) error) error { -// return DoUpdate(s, f) -//} -// -//func (s *MemStore) Put(key string, value []byte) error { -// s.mu.Lock() -// -// s.store[key] = value -// s.mu.Unlock() -// return nil -//} -// -//func (s *MemStore) Get(key string) (*KeyValue, error) { -// s.mu.Lock() -// value, ok := s.store[key] -// s.mu.Unlock() -// if !ok { -// return nil, ErrNoKeyExists -// } -// return &KeyValue{ -// Key: key, -// Value: value, -// }, nil -//} -// -//func (s *MemStore) Delete(key string) error { -// s.mu.Lock() -// delete(s.store, key) -// s.mu.Unlock() -// return nil -//} -// -//func (s *MemStore) Exists(key string) (bool, error) { -// s.mu.Lock() -// _, ok := s.store[key] -// s.mu.Unlock() -// return ok, nil -//} -// -//type keySortedKVs []*KeyValue -// -//func (s keySortedKVs) Len() int { return len(s) } -//func (s keySortedKVs) Less(i int, j int) bool { return s[i].Key < s[j].Key } -//func (s keySortedKVs) Swap(i int, j int) { s[i], s[j] = s[j], s[i] } -// -//func (s *MemStore) List(prefix string) ([]*KeyValue, error) { -// s.mu.Lock() -// kvs := make([]*KeyValue, 0, len(s.store)) -// for k, v := range s.store { -// if strings.HasPrefix(k, prefix) { -// kvs = append(kvs, &KeyValue{Key: k, Value: v}) -// } -// } -// s.mu.Unlock() -// sort.Sort(keySortedKVs(kvs)) -// return kvs, nil -//} -// -//func (s *MemStore) BeginTx() (Tx, error) { -// return s.newTx() -//} -// -//func (s *MemStore) BeginReadOnlyTx() (ReadOnlyTx, error) { -// return s.newTx() -//} -// -//func (s *MemStore) newTx() (*memTx, error) { -// // A Tx carries the lock, and must be committed or rolledback before another operation can continue. -// s.mu.Lock() -// store := make(map[string][]byte, len(s.store)) -// for k, v := range s.store { -// store[k] = v -// } -// return &memTx{ -// m: s, -// store: store, -// }, nil -//} -// -//type memTxState int -// -//const ( -// unCommitted memTxState = iota -// committed -// rolledback -//) -// -//type memTx struct { -// state memTxState -// m *MemStore -// store map[string][]byte -//} -// -//func (t *memTx) Get(key string) (*KeyValue, error) { -// value, ok := t.store[key] -// if !ok { -// return nil, ErrNoKeyExists -// } -// return &KeyValue{Key: key, Value: value}, nil -//} -// -//func (t *memTx) Exists(key string) (bool, error) { -// _, ok := t.store[key] -// return ok, nil -//} -// -//func (t *memTx) List(prefix string) ([]*KeyValue, error) { -// kvs := make([]*KeyValue, 0, len(t.store)) -// for k, v := range t.store { -// if strings.HasPrefix(k, prefix) { -// kvs = append(kvs, &KeyValue{Key: k, Value: v}) -// } -// } -// sort.Sort(keySortedKVs(kvs)) -// return kvs, nil -//} -// -//func (t *memTx) Put(key string, value []byte) error { -// t.store[key] = value -// return nil -//} -// -//func (t *memTx) Delete(key string) error { -// delete(t.store, key) -// return nil -//} -// -//func (t *memTx) Commit() error { -// if t.state == unCommitted { -// t.m.store = t.store -// t.state = committed -// t.m.mu.Unlock() -// return nil -// } -// return fmt.Errorf("cannot commit transaction, transaction in state %v", t.state) -//} -// -//func (t *memTx) Rollback() error { -// if t.state == unCommitted { -// t.state = rolledback -// t.m.mu.Unlock() -// } -// return nil -//} diff --git a/services/storage/storage.go b/services/storage/storage.go index f0fa18618b..bf2b6406db 100644 --- a/services/storage/storage.go +++ b/services/storage/storage.go @@ -72,6 +72,7 @@ type TxOperator interface { } // Common interface for interacting with a simple Key/Value storage +// Yes, I realize this is a bad name. type Interface interface { // View creates a new read only transaction and always rolls it back. @@ -80,6 +81,8 @@ type Interface interface { // Update creates a new read-write transaction and always rolls it back. // If the function returns a nil error the transaction is committed, otherwise the error is returned. Update(func(Tx) error) error + + Store(Buckets ...[]byte) Interface } // View manages a read only transaction. diff --git a/services/storage/storage_test.go b/services/storage/storage_test.go index 1d10897d0b..d1a66ccdaa 100644 --- a/services/storage/storage_test.go +++ b/services/storage/storage_test.go @@ -3,87 +3,50 @@ package storage_test import ( "bytes" "fmt" - "os" - "path/filepath" "testing" "github.com/influxdata/kapacitor/services/storage" "github.com/influxdata/kapacitor/services/storage/storagetest" "github.com/pkg/errors" - bolt "go.etcd.io/bbolt" ) // Error used to specifically trigger a rollback for tests. var rollbackErr = errors.New("rollback") -type createStoreCloser func() (storeCloser, error) +//type storeCloser interface { +// Store(namespace string) storage.Interface +// Close() error +//} + +//type boltDB struct { +// db *bolt.DB +// dir string +//} +// +//func (b boltDB) Close() error { +// _ = b.db.Close() // we don't need to worry about this error +// return os.RemoveAll(b.dir) +//} +// +//func newBolt() (storeCloser, error) { +// tmpDir, err := os.MkdirTemp("", "storage-bolt") +// if err != nil { +// return nil, fmt.Errorf("failed to create temp directory: %v", err) +// } +// db, err := bolt.Open(filepath.Join(tmpDir, "bolt.db"), 0600, nil) +// if err != nil { +// return boltDB{}, err +// } +// return boltDB{ +// db: db, +// dir: tmpDir, +// }, nil +//} +// +//func (b boltDB) Store(bucket string) storage.Interface { +// return storage.NewBolt(b.db, []byte(bucket)) +//} -// stores is a map of all storage implementations, -// each test will be run against the stores found in this map. -var stores = map[string]createStoreCloser{ - "bolt": newBolt, - "mem": newMemStore, -} - -type storeCloser interface { - Store(namespace string) storage.Interface - Close() -} - -type boltDB struct { - db *bolt.DB - dir string -} - -func (b boltDB) Close() { - _ = b.db.Close() - os.RemoveAll(b.dir) -} - -func newBolt() (storeCloser, error) { - tmpDir, err := os.MkdirTemp("", "storage-bolt") - if err != nil { - return nil, fmt.Errorf("failed to create temp directory: %v", err) - } - db, err := bolt.Open(filepath.Join(tmpDir, "bolt.db"), 0600, nil) - if err != nil { - return boltDB{}, err - } - return boltDB{ - db: db, - dir: tmpDir, - }, nil -} - -func (b boltDB) Store(bucket string) storage.Interface { - return storage.NewBolt(b.db, bucket) -} - -type memStore struct { - stores map[string]storage.Interface -} - -func newMemStore() (storeCloser, error) { - return memStore{ - stores: make(map[string]storage.Interface), - }, nil -} - -func (s memStore) Store(name string) storage.Interface { - m, ok := s.stores[name] - if ok { - return m - } - m = storage.NewMemStore(name) - s.stores[name] = m - return m -} - -func (s memStore) Close() { -} - -======= ->>>>>>> c705d4c2 (WIP) func TestStorage_CRUD(t *testing.T) { t.Run("bolt", func(t *testing.T) { db, err := storagetest.NewBolt() diff --git a/services/storage/storagetest/storage.go b/services/storage/storagetest/storage.go index 3188c4ce7f..3d7061e999 100644 --- a/services/storage/storagetest/storage.go +++ b/services/storage/storagetest/storage.go @@ -19,8 +19,6 @@ type boltDB struct { *bolt.DB } -var countTestBolts int32 - // NewBolt is an in-memory db that deletes itself when closed, do not use except for testing. func NewBolt() (*boltDB, error) { db, err := bolt.Open(":memory:", 0600, &bolt.Options{ @@ -29,10 +27,6 @@ func NewBolt() (*boltDB, error) { MemOnly: true, }) if err != nil { - /*if err2 := os.RemoveAll(tmpDir); err2 != nil { - return nil, err2 - }*/ - return nil, err } return &boltDB{db}, nil @@ -51,7 +45,6 @@ func (b boltDB) Close() error { } func New() TestStore { - db, err := NewBolt() if err != nil { panic(err) @@ -70,10 +63,11 @@ func (s TestStore) Store(name string) storage.Interface { func (s TestStore) Versions() storage.Versions { return s.versions } + func (s TestStore) Register(name string, store storage.StoreActioner) { s.registrar.Register(name, store) } func (s TestStore) Close() { - s.db.Close() + //s.db.Close() } diff --git a/task/servicetest/servicetest.go b/task/servicetest/servicetest.go index 9fc16276e0..679afd0b62 100644 --- a/task/servicetest/servicetest.go +++ b/task/servicetest/servicetest.go @@ -57,7 +57,7 @@ func TestTaskService(t *testing.T, fn BackendComponentFactory, testCategory ...s testTaskCRUD(t, sys) }) - t.Run("FindTasks paging", func(t *testing.T) { + t.Run("FindTasks_paging", func(t *testing.T) { testTaskFindTasksPaging(t, sys) }) diff --git a/udf/agent/py/kapacitor/udf/udf_pb2.py b/udf/agent/py/kapacitor/udf/udf_pb2.py index ffb8273dcb..cc0d47c5c5 100644 --- a/udf/agent/py/kapacitor/udf/udf_pb2.py +++ b/udf/agent/py/kapacitor/udf/udf_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: udf.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -14,1660 +13,86 @@ -DESCRIPTOR = _descriptor.FileDescriptor( - name='udf.proto', - package='agent', - syntax='proto3', - serialized_options=b'Z\007.;agent', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\tudf.proto\x12\x05\x61gent\"\r\n\x0bInfoRequest\"\xc7\x01\n\x0cInfoResponse\x12\x1e\n\x05wants\x18\x01 \x01(\x0e\x32\x0f.agent.EdgeType\x12!\n\x08provides\x18\x02 \x01(\x0e\x32\x0f.agent.EdgeType\x12\x31\n\x07options\x18\x03 \x03(\x0b\x32 .agent.InfoResponse.OptionsEntry\x1a\x41\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.agent.OptionInfo:\x02\x38\x01\"2\n\nOptionInfo\x12$\n\nvalueTypes\x18\x01 \x03(\x0e\x32\x10.agent.ValueType\"M\n\x0bInitRequest\x12\x1e\n\x07options\x18\x01 \x03(\x0b\x32\r.agent.Option\x12\x0e\n\x06taskID\x18\x02 \x01(\t\x12\x0e\n\x06nodeID\x18\x03 \x01(\t\":\n\x06Option\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x06values\x18\x02 \x03(\x0b\x32\x12.agent.OptionValue\"\xa6\x01\n\x0bOptionValue\x12\x1e\n\x04type\x18\x01 \x01(\x0e\x32\x10.agent.ValueType\x12\x13\n\tboolValue\x18\x02 \x01(\x08H\x00\x12\x12\n\x08intValue\x18\x03 \x01(\x03H\x00\x12\x15\n\x0b\x64oubleValue\x18\x04 \x01(\x01H\x00\x12\x15\n\x0bstringValue\x18\x05 \x01(\tH\x00\x12\x17\n\rdurationValue\x18\x06 \x01(\x03H\x00\x42\x07\n\x05value\".\n\x0cInitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x11\n\x0fSnapshotRequest\"$\n\x10SnapshotResponse\x12\x10\n\x08snapshot\x18\x01 \x01(\x0c\"\"\n\x0eRestoreRequest\x12\x10\n\x08snapshot\x18\x01 \x01(\x0c\"1\n\x0fRestoreResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\" \n\x10KeepaliveRequest\x12\x0c\n\x04time\x18\x01 \x01(\x03\"!\n\x11KeepaliveResponse\x12\x0c\n\x04time\x18\x01 \x01(\x03\"\x1e\n\rErrorResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"\x9f\x01\n\nBeginBatch\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\t\x12)\n\x04tags\x18\x03 \x03(\x0b\x32\x1b.agent.BeginBatch.TagsEntry\x12\x0c\n\x04size\x18\x04 \x01(\x03\x12\x0e\n\x06\x62yName\x18\x05 \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf1\x04\n\x05Point\x12\x0c\n\x04time\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x03 \x01(\t\x12\x17\n\x0fretentionPolicy\x18\x04 \x01(\t\x12\r\n\x05group\x18\x05 \x01(\t\x12\x12\n\ndimensions\x18\x06 \x03(\t\x12$\n\x04tags\x18\x07 \x03(\x0b\x32\x16.agent.Point.TagsEntry\x12\x34\n\x0c\x66ieldsDouble\x18\x08 \x03(\x0b\x32\x1e.agent.Point.FieldsDoubleEntry\x12.\n\tfieldsInt\x18\t \x03(\x0b\x32\x1b.agent.Point.FieldsIntEntry\x12\x34\n\x0c\x66ieldsString\x18\n \x03(\x0b\x32\x1e.agent.Point.FieldsStringEntry\x12\x30\n\nfieldsBool\x18\x0c \x03(\x0b\x32\x1c.agent.Point.FieldsBoolEntry\x12\x0e\n\x06\x62yName\x18\x0b \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x46ieldsDoubleEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x30\n\x0e\x46ieldsIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x33\n\x11\x46ieldsStringEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0f\x46ieldsBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"\x9b\x01\n\x08\x45ndBatch\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\t\x12\x0c\n\x04tmax\x18\x03 \x01(\x03\x12\'\n\x04tags\x18\x04 \x03(\x0b\x32\x19.agent.EndBatch.TagsEntry\x12\x0e\n\x06\x62yName\x18\x05 \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc3\x02\n\x07Request\x12\"\n\x04info\x18\x01 \x01(\x0b\x32\x12.agent.InfoRequestH\x00\x12\"\n\x04init\x18\x02 \x01(\x0b\x32\x12.agent.InitRequestH\x00\x12,\n\tkeepalive\x18\x03 \x01(\x0b\x32\x17.agent.KeepaliveRequestH\x00\x12*\n\x08snapshot\x18\x04 \x01(\x0b\x32\x16.agent.SnapshotRequestH\x00\x12(\n\x07restore\x18\x05 \x01(\x0b\x32\x15.agent.RestoreRequestH\x00\x12\"\n\x05\x62\x65gin\x18\x10 \x01(\x0b\x32\x11.agent.BeginBatchH\x00\x12\x1d\n\x05point\x18\x11 \x01(\x0b\x32\x0c.agent.PointH\x00\x12\x1e\n\x03\x65nd\x18\x12 \x01(\x0b\x32\x0f.agent.EndBatchH\x00\x42\t\n\x07message\"\xf0\x02\n\x08Response\x12#\n\x04info\x18\x01 \x01(\x0b\x32\x13.agent.InfoResponseH\x00\x12#\n\x04init\x18\x02 \x01(\x0b\x32\x13.agent.InitResponseH\x00\x12-\n\tkeepalive\x18\x03 \x01(\x0b\x32\x18.agent.KeepaliveResponseH\x00\x12+\n\x08snapshot\x18\x04 \x01(\x0b\x32\x17.agent.SnapshotResponseH\x00\x12)\n\x07restore\x18\x05 \x01(\x0b\x32\x16.agent.RestoreResponseH\x00\x12%\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x14.agent.ErrorResponseH\x00\x12\"\n\x05\x62\x65gin\x18\x10 \x01(\x0b\x32\x11.agent.BeginBatchH\x00\x12\x1d\n\x05point\x18\x11 \x01(\x0b\x32\x0c.agent.PointH\x00\x12\x1e\n\x03\x65nd\x18\x12 \x01(\x0b\x32\x0f.agent.EndBatchH\x00\x42\t\n\x07message*!\n\x08\x45\x64geType\x12\n\n\x06STREAM\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01*D\n\tValueType\x12\x08\n\x04\x42OOL\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0c\n\x08\x44URATION\x10\x04\x42\tZ\x07.;agentb\x06proto3' -) - -_EDGETYPE = _descriptor.EnumDescriptor( - name='EdgeType', - full_name='agent.EdgeType', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='STREAM', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='BATCH', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=2535, - serialized_end=2568, -) -_sym_db.RegisterEnumDescriptor(_EDGETYPE) - -EdgeType = enum_type_wrapper.EnumTypeWrapper(_EDGETYPE) -_VALUETYPE = _descriptor.EnumDescriptor( - name='ValueType', - full_name='agent.ValueType', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='BOOL', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='INT', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='DOUBLE', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='STRING', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='DURATION', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=2570, - serialized_end=2638, -) -_sym_db.RegisterEnumDescriptor(_VALUETYPE) - -ValueType = enum_type_wrapper.EnumTypeWrapper(_VALUETYPE) -STREAM = 0 -BATCH = 1 -BOOL = 0 -INT = 1 -DOUBLE = 2 -STRING = 3 -DURATION = 4 - - - -_INFOREQUEST = _descriptor.Descriptor( - name='InfoRequest', - full_name='agent.InfoRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=20, - serialized_end=33, -) - - -_INFORESPONSE_OPTIONSENTRY = _descriptor.Descriptor( - name='OptionsEntry', - full_name='agent.InfoResponse.OptionsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.InfoResponse.OptionsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.InfoResponse.OptionsEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=170, - serialized_end=235, -) - -_INFORESPONSE = _descriptor.Descriptor( - name='InfoResponse', - full_name='agent.InfoResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='wants', full_name='agent.InfoResponse.wants', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='provides', full_name='agent.InfoResponse.provides', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='options', full_name='agent.InfoResponse.options', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_INFORESPONSE_OPTIONSENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=36, - serialized_end=235, -) - - -_OPTIONINFO = _descriptor.Descriptor( - name='OptionInfo', - full_name='agent.OptionInfo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='valueTypes', full_name='agent.OptionInfo.valueTypes', index=0, - number=1, type=14, cpp_type=8, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=237, - serialized_end=287, -) - - -_INITREQUEST = _descriptor.Descriptor( - name='InitRequest', - full_name='agent.InitRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='options', full_name='agent.InitRequest.options', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='taskID', full_name='agent.InitRequest.taskID', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='nodeID', full_name='agent.InitRequest.nodeID', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=289, - serialized_end=366, -) - - -_OPTION = _descriptor.Descriptor( - name='Option', - full_name='agent.Option', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='agent.Option.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='values', full_name='agent.Option.values', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=368, - serialized_end=426, -) - - -_OPTIONVALUE = _descriptor.Descriptor( - name='OptionValue', - full_name='agent.OptionValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='type', full_name='agent.OptionValue.type', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='boolValue', full_name='agent.OptionValue.boolValue', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='intValue', full_name='agent.OptionValue.intValue', index=2, - number=3, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='doubleValue', full_name='agent.OptionValue.doubleValue', index=3, - number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='stringValue', full_name='agent.OptionValue.stringValue', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='durationValue', full_name='agent.OptionValue.durationValue', index=5, - number=6, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='agent.OptionValue.value', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=429, - serialized_end=595, -) - - -_INITRESPONSE = _descriptor.Descriptor( - name='InitResponse', - full_name='agent.InitResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='success', full_name='agent.InitResponse.success', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='error', full_name='agent.InitResponse.error', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=597, - serialized_end=643, -) - - -_SNAPSHOTREQUEST = _descriptor.Descriptor( - name='SnapshotRequest', - full_name='agent.SnapshotRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=645, - serialized_end=662, -) - - -_SNAPSHOTRESPONSE = _descriptor.Descriptor( - name='SnapshotResponse', - full_name='agent.SnapshotResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='snapshot', full_name='agent.SnapshotResponse.snapshot', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=664, - serialized_end=700, -) - - -_RESTOREREQUEST = _descriptor.Descriptor( - name='RestoreRequest', - full_name='agent.RestoreRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='snapshot', full_name='agent.RestoreRequest.snapshot', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=702, - serialized_end=736, -) - - -_RESTORERESPONSE = _descriptor.Descriptor( - name='RestoreResponse', - full_name='agent.RestoreResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='success', full_name='agent.RestoreResponse.success', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='error', full_name='agent.RestoreResponse.error', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=738, - serialized_end=787, -) - - -_KEEPALIVEREQUEST = _descriptor.Descriptor( - name='KeepaliveRequest', - full_name='agent.KeepaliveRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='time', full_name='agent.KeepaliveRequest.time', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=789, - serialized_end=821, -) - - -_KEEPALIVERESPONSE = _descriptor.Descriptor( - name='KeepaliveResponse', - full_name='agent.KeepaliveResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='time', full_name='agent.KeepaliveResponse.time', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=823, - serialized_end=856, -) - - -_ERRORRESPONSE = _descriptor.Descriptor( - name='ErrorResponse', - full_name='agent.ErrorResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='error', full_name='agent.ErrorResponse.error', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=858, - serialized_end=888, -) - - -_BEGINBATCH_TAGSENTRY = _descriptor.Descriptor( - name='TagsEntry', - full_name='agent.BeginBatch.TagsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.BeginBatch.TagsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.BeginBatch.TagsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1007, - serialized_end=1050, -) - -_BEGINBATCH = _descriptor.Descriptor( - name='BeginBatch', - full_name='agent.BeginBatch', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='agent.BeginBatch.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='group', full_name='agent.BeginBatch.group', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tags', full_name='agent.BeginBatch.tags', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='size', full_name='agent.BeginBatch.size', index=3, - number=4, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='byName', full_name='agent.BeginBatch.byName', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_BEGINBATCH_TAGSENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=891, - serialized_end=1050, -) - - -_POINT_TAGSENTRY = _descriptor.Descriptor( - name='TagsEntry', - full_name='agent.Point.TagsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.Point.TagsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.Point.TagsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1007, - serialized_end=1050, -) - -_POINT_FIELDSDOUBLEENTRY = _descriptor.Descriptor( - name='FieldsDoubleEntry', - full_name='agent.Point.FieldsDoubleEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.Point.FieldsDoubleEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.Point.FieldsDoubleEntry.value', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1473, - serialized_end=1524, -) - -_POINT_FIELDSINTENTRY = _descriptor.Descriptor( - name='FieldsIntEntry', - full_name='agent.Point.FieldsIntEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.Point.FieldsIntEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.Point.FieldsIntEntry.value', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1526, - serialized_end=1574, -) - -_POINT_FIELDSSTRINGENTRY = _descriptor.Descriptor( - name='FieldsStringEntry', - full_name='agent.Point.FieldsStringEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.Point.FieldsStringEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.Point.FieldsStringEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1576, - serialized_end=1627, -) - -_POINT_FIELDSBOOLENTRY = _descriptor.Descriptor( - name='FieldsBoolEntry', - full_name='agent.Point.FieldsBoolEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.Point.FieldsBoolEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.Point.FieldsBoolEntry.value', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1629, - serialized_end=1678, -) - -_POINT = _descriptor.Descriptor( - name='Point', - full_name='agent.Point', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='time', full_name='agent.Point.time', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='name', full_name='agent.Point.name', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='database', full_name='agent.Point.database', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='retentionPolicy', full_name='agent.Point.retentionPolicy', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='group', full_name='agent.Point.group', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='dimensions', full_name='agent.Point.dimensions', index=5, - number=6, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tags', full_name='agent.Point.tags', index=6, - number=7, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fieldsDouble', full_name='agent.Point.fieldsDouble', index=7, - number=8, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fieldsInt', full_name='agent.Point.fieldsInt', index=8, - number=9, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fieldsString', full_name='agent.Point.fieldsString', index=9, - number=10, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fieldsBool', full_name='agent.Point.fieldsBool', index=10, - number=12, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='byName', full_name='agent.Point.byName', index=11, - number=11, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_POINT_TAGSENTRY, _POINT_FIELDSDOUBLEENTRY, _POINT_FIELDSINTENTRY, _POINT_FIELDSSTRINGENTRY, _POINT_FIELDSBOOLENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1053, - serialized_end=1678, -) - - -_ENDBATCH_TAGSENTRY = _descriptor.Descriptor( - name='TagsEntry', - full_name='agent.EndBatch.TagsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='agent.EndBatch.TagsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='agent.EndBatch.TagsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1007, - serialized_end=1050, -) - -_ENDBATCH = _descriptor.Descriptor( - name='EndBatch', - full_name='agent.EndBatch', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='agent.EndBatch.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='group', full_name='agent.EndBatch.group', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tmax', full_name='agent.EndBatch.tmax', index=2, - number=3, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tags', full_name='agent.EndBatch.tags', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='byName', full_name='agent.EndBatch.byName', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_ENDBATCH_TAGSENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1681, - serialized_end=1836, -) - - -_REQUEST = _descriptor.Descriptor( - name='Request', - full_name='agent.Request', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='info', full_name='agent.Request.info', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='init', full_name='agent.Request.init', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='keepalive', full_name='agent.Request.keepalive', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='snapshot', full_name='agent.Request.snapshot', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='restore', full_name='agent.Request.restore', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='begin', full_name='agent.Request.begin', index=5, - number=16, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='point', full_name='agent.Request.point', index=6, - number=17, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='end', full_name='agent.Request.end', index=7, - number=18, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='message', full_name='agent.Request.message', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=1839, - serialized_end=2162, -) - - -_RESPONSE = _descriptor.Descriptor( - name='Response', - full_name='agent.Response', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='info', full_name='agent.Response.info', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='init', full_name='agent.Response.init', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='keepalive', full_name='agent.Response.keepalive', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='snapshot', full_name='agent.Response.snapshot', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='restore', full_name='agent.Response.restore', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='error', full_name='agent.Response.error', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='begin', full_name='agent.Response.begin', index=6, - number=16, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='point', full_name='agent.Response.point', index=7, - number=17, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='end', full_name='agent.Response.end', index=8, - number=18, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='message', full_name='agent.Response.message', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=2165, - serialized_end=2533, -) - -_INFORESPONSE_OPTIONSENTRY.fields_by_name['value'].message_type = _OPTIONINFO -_INFORESPONSE_OPTIONSENTRY.containing_type = _INFORESPONSE -_INFORESPONSE.fields_by_name['wants'].enum_type = _EDGETYPE -_INFORESPONSE.fields_by_name['provides'].enum_type = _EDGETYPE -_INFORESPONSE.fields_by_name['options'].message_type = _INFORESPONSE_OPTIONSENTRY -_OPTIONINFO.fields_by_name['valueTypes'].enum_type = _VALUETYPE -_INITREQUEST.fields_by_name['options'].message_type = _OPTION -_OPTION.fields_by_name['values'].message_type = _OPTIONVALUE -_OPTIONVALUE.fields_by_name['type'].enum_type = _VALUETYPE -_OPTIONVALUE.oneofs_by_name['value'].fields.append( - _OPTIONVALUE.fields_by_name['boolValue']) -_OPTIONVALUE.fields_by_name['boolValue'].containing_oneof = _OPTIONVALUE.oneofs_by_name['value'] -_OPTIONVALUE.oneofs_by_name['value'].fields.append( - _OPTIONVALUE.fields_by_name['intValue']) -_OPTIONVALUE.fields_by_name['intValue'].containing_oneof = _OPTIONVALUE.oneofs_by_name['value'] -_OPTIONVALUE.oneofs_by_name['value'].fields.append( - _OPTIONVALUE.fields_by_name['doubleValue']) -_OPTIONVALUE.fields_by_name['doubleValue'].containing_oneof = _OPTIONVALUE.oneofs_by_name['value'] -_OPTIONVALUE.oneofs_by_name['value'].fields.append( - _OPTIONVALUE.fields_by_name['stringValue']) -_OPTIONVALUE.fields_by_name['stringValue'].containing_oneof = _OPTIONVALUE.oneofs_by_name['value'] -_OPTIONVALUE.oneofs_by_name['value'].fields.append( - _OPTIONVALUE.fields_by_name['durationValue']) -_OPTIONVALUE.fields_by_name['durationValue'].containing_oneof = _OPTIONVALUE.oneofs_by_name['value'] -_BEGINBATCH_TAGSENTRY.containing_type = _BEGINBATCH -_BEGINBATCH.fields_by_name['tags'].message_type = _BEGINBATCH_TAGSENTRY -_POINT_TAGSENTRY.containing_type = _POINT -_POINT_FIELDSDOUBLEENTRY.containing_type = _POINT -_POINT_FIELDSINTENTRY.containing_type = _POINT -_POINT_FIELDSSTRINGENTRY.containing_type = _POINT -_POINT_FIELDSBOOLENTRY.containing_type = _POINT -_POINT.fields_by_name['tags'].message_type = _POINT_TAGSENTRY -_POINT.fields_by_name['fieldsDouble'].message_type = _POINT_FIELDSDOUBLEENTRY -_POINT.fields_by_name['fieldsInt'].message_type = _POINT_FIELDSINTENTRY -_POINT.fields_by_name['fieldsString'].message_type = _POINT_FIELDSSTRINGENTRY -_POINT.fields_by_name['fieldsBool'].message_type = _POINT_FIELDSBOOLENTRY -_ENDBATCH_TAGSENTRY.containing_type = _ENDBATCH -_ENDBATCH.fields_by_name['tags'].message_type = _ENDBATCH_TAGSENTRY -_REQUEST.fields_by_name['info'].message_type = _INFOREQUEST -_REQUEST.fields_by_name['init'].message_type = _INITREQUEST -_REQUEST.fields_by_name['keepalive'].message_type = _KEEPALIVEREQUEST -_REQUEST.fields_by_name['snapshot'].message_type = _SNAPSHOTREQUEST -_REQUEST.fields_by_name['restore'].message_type = _RESTOREREQUEST -_REQUEST.fields_by_name['begin'].message_type = _BEGINBATCH -_REQUEST.fields_by_name['point'].message_type = _POINT -_REQUEST.fields_by_name['end'].message_type = _ENDBATCH -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['info']) -_REQUEST.fields_by_name['info'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['init']) -_REQUEST.fields_by_name['init'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['keepalive']) -_REQUEST.fields_by_name['keepalive'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['snapshot']) -_REQUEST.fields_by_name['snapshot'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['restore']) -_REQUEST.fields_by_name['restore'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['begin']) -_REQUEST.fields_by_name['begin'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['point']) -_REQUEST.fields_by_name['point'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_REQUEST.oneofs_by_name['message'].fields.append( - _REQUEST.fields_by_name['end']) -_REQUEST.fields_by_name['end'].containing_oneof = _REQUEST.oneofs_by_name['message'] -_RESPONSE.fields_by_name['info'].message_type = _INFORESPONSE -_RESPONSE.fields_by_name['init'].message_type = _INITRESPONSE -_RESPONSE.fields_by_name['keepalive'].message_type = _KEEPALIVERESPONSE -_RESPONSE.fields_by_name['snapshot'].message_type = _SNAPSHOTRESPONSE -_RESPONSE.fields_by_name['restore'].message_type = _RESTORERESPONSE -_RESPONSE.fields_by_name['error'].message_type = _ERRORRESPONSE -_RESPONSE.fields_by_name['begin'].message_type = _BEGINBATCH -_RESPONSE.fields_by_name['point'].message_type = _POINT -_RESPONSE.fields_by_name['end'].message_type = _ENDBATCH -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['info']) -_RESPONSE.fields_by_name['info'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['init']) -_RESPONSE.fields_by_name['init'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['keepalive']) -_RESPONSE.fields_by_name['keepalive'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['snapshot']) -_RESPONSE.fields_by_name['snapshot'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['restore']) -_RESPONSE.fields_by_name['restore'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['error']) -_RESPONSE.fields_by_name['error'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['begin']) -_RESPONSE.fields_by_name['begin'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['point']) -_RESPONSE.fields_by_name['point'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -_RESPONSE.oneofs_by_name['message'].fields.append( - _RESPONSE.fields_by_name['end']) -_RESPONSE.fields_by_name['end'].containing_oneof = _RESPONSE.oneofs_by_name['message'] -DESCRIPTOR.message_types_by_name['InfoRequest'] = _INFOREQUEST -DESCRIPTOR.message_types_by_name['InfoResponse'] = _INFORESPONSE -DESCRIPTOR.message_types_by_name['OptionInfo'] = _OPTIONINFO -DESCRIPTOR.message_types_by_name['InitRequest'] = _INITREQUEST -DESCRIPTOR.message_types_by_name['Option'] = _OPTION -DESCRIPTOR.message_types_by_name['OptionValue'] = _OPTIONVALUE -DESCRIPTOR.message_types_by_name['InitResponse'] = _INITRESPONSE -DESCRIPTOR.message_types_by_name['SnapshotRequest'] = _SNAPSHOTREQUEST -DESCRIPTOR.message_types_by_name['SnapshotResponse'] = _SNAPSHOTRESPONSE -DESCRIPTOR.message_types_by_name['RestoreRequest'] = _RESTOREREQUEST -DESCRIPTOR.message_types_by_name['RestoreResponse'] = _RESTORERESPONSE -DESCRIPTOR.message_types_by_name['KeepaliveRequest'] = _KEEPALIVEREQUEST -DESCRIPTOR.message_types_by_name['KeepaliveResponse'] = _KEEPALIVERESPONSE -DESCRIPTOR.message_types_by_name['ErrorResponse'] = _ERRORRESPONSE -DESCRIPTOR.message_types_by_name['BeginBatch'] = _BEGINBATCH -DESCRIPTOR.message_types_by_name['Point'] = _POINT -DESCRIPTOR.message_types_by_name['EndBatch'] = _ENDBATCH -DESCRIPTOR.message_types_by_name['Request'] = _REQUEST -DESCRIPTOR.message_types_by_name['Response'] = _RESPONSE -DESCRIPTOR.enum_types_by_name['EdgeType'] = _EDGETYPE -DESCRIPTOR.enum_types_by_name['ValueType'] = _VALUETYPE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -InfoRequest = _reflection.GeneratedProtocolMessageType('InfoRequest', (_message.Message,), { - 'DESCRIPTOR' : _INFOREQUEST, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.InfoRequest) - }) -_sym_db.RegisterMessage(InfoRequest) - -InfoResponse = _reflection.GeneratedProtocolMessageType('InfoResponse', (_message.Message,), { - - 'OptionsEntry' : _reflection.GeneratedProtocolMessageType('OptionsEntry', (_message.Message,), { - 'DESCRIPTOR' : _INFORESPONSE_OPTIONSENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.InfoResponse.OptionsEntry) - }) - , - 'DESCRIPTOR' : _INFORESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.InfoResponse) - }) -_sym_db.RegisterMessage(InfoResponse) -_sym_db.RegisterMessage(InfoResponse.OptionsEntry) - -OptionInfo = _reflection.GeneratedProtocolMessageType('OptionInfo', (_message.Message,), { - 'DESCRIPTOR' : _OPTIONINFO, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.OptionInfo) - }) -_sym_db.RegisterMessage(OptionInfo) - -InitRequest = _reflection.GeneratedProtocolMessageType('InitRequest', (_message.Message,), { - 'DESCRIPTOR' : _INITREQUEST, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.InitRequest) - }) -_sym_db.RegisterMessage(InitRequest) - -Option = _reflection.GeneratedProtocolMessageType('Option', (_message.Message,), { - 'DESCRIPTOR' : _OPTION, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Option) - }) -_sym_db.RegisterMessage(Option) - -OptionValue = _reflection.GeneratedProtocolMessageType('OptionValue', (_message.Message,), { - 'DESCRIPTOR' : _OPTIONVALUE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.OptionValue) - }) -_sym_db.RegisterMessage(OptionValue) - -InitResponse = _reflection.GeneratedProtocolMessageType('InitResponse', (_message.Message,), { - 'DESCRIPTOR' : _INITRESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.InitResponse) - }) -_sym_db.RegisterMessage(InitResponse) - -SnapshotRequest = _reflection.GeneratedProtocolMessageType('SnapshotRequest', (_message.Message,), { - 'DESCRIPTOR' : _SNAPSHOTREQUEST, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.SnapshotRequest) - }) -_sym_db.RegisterMessage(SnapshotRequest) - -SnapshotResponse = _reflection.GeneratedProtocolMessageType('SnapshotResponse', (_message.Message,), { - 'DESCRIPTOR' : _SNAPSHOTRESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.SnapshotResponse) - }) -_sym_db.RegisterMessage(SnapshotResponse) - -RestoreRequest = _reflection.GeneratedProtocolMessageType('RestoreRequest', (_message.Message,), { - 'DESCRIPTOR' : _RESTOREREQUEST, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.RestoreRequest) - }) -_sym_db.RegisterMessage(RestoreRequest) - -RestoreResponse = _reflection.GeneratedProtocolMessageType('RestoreResponse', (_message.Message,), { - 'DESCRIPTOR' : _RESTORERESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.RestoreResponse) - }) -_sym_db.RegisterMessage(RestoreResponse) - -KeepaliveRequest = _reflection.GeneratedProtocolMessageType('KeepaliveRequest', (_message.Message,), { - 'DESCRIPTOR' : _KEEPALIVEREQUEST, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.KeepaliveRequest) - }) -_sym_db.RegisterMessage(KeepaliveRequest) - -KeepaliveResponse = _reflection.GeneratedProtocolMessageType('KeepaliveResponse', (_message.Message,), { - 'DESCRIPTOR' : _KEEPALIVERESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.KeepaliveResponse) - }) -_sym_db.RegisterMessage(KeepaliveResponse) - -ErrorResponse = _reflection.GeneratedProtocolMessageType('ErrorResponse', (_message.Message,), { - 'DESCRIPTOR' : _ERRORRESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.ErrorResponse) - }) -_sym_db.RegisterMessage(ErrorResponse) - -BeginBatch = _reflection.GeneratedProtocolMessageType('BeginBatch', (_message.Message,), { - - 'TagsEntry' : _reflection.GeneratedProtocolMessageType('TagsEntry', (_message.Message,), { - 'DESCRIPTOR' : _BEGINBATCH_TAGSENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.BeginBatch.TagsEntry) - }) - , - 'DESCRIPTOR' : _BEGINBATCH, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.BeginBatch) - }) -_sym_db.RegisterMessage(BeginBatch) -_sym_db.RegisterMessage(BeginBatch.TagsEntry) - -Point = _reflection.GeneratedProtocolMessageType('Point', (_message.Message,), { - - 'TagsEntry' : _reflection.GeneratedProtocolMessageType('TagsEntry', (_message.Message,), { - 'DESCRIPTOR' : _POINT_TAGSENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Point.TagsEntry) - }) - , - - 'FieldsDoubleEntry' : _reflection.GeneratedProtocolMessageType('FieldsDoubleEntry', (_message.Message,), { - 'DESCRIPTOR' : _POINT_FIELDSDOUBLEENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Point.FieldsDoubleEntry) - }) - , - - 'FieldsIntEntry' : _reflection.GeneratedProtocolMessageType('FieldsIntEntry', (_message.Message,), { - 'DESCRIPTOR' : _POINT_FIELDSINTENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Point.FieldsIntEntry) - }) - , - - 'FieldsStringEntry' : _reflection.GeneratedProtocolMessageType('FieldsStringEntry', (_message.Message,), { - 'DESCRIPTOR' : _POINT_FIELDSSTRINGENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Point.FieldsStringEntry) - }) - , - - 'FieldsBoolEntry' : _reflection.GeneratedProtocolMessageType('FieldsBoolEntry', (_message.Message,), { - 'DESCRIPTOR' : _POINT_FIELDSBOOLENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Point.FieldsBoolEntry) - }) - , - 'DESCRIPTOR' : _POINT, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Point) - }) -_sym_db.RegisterMessage(Point) -_sym_db.RegisterMessage(Point.TagsEntry) -_sym_db.RegisterMessage(Point.FieldsDoubleEntry) -_sym_db.RegisterMessage(Point.FieldsIntEntry) -_sym_db.RegisterMessage(Point.FieldsStringEntry) -_sym_db.RegisterMessage(Point.FieldsBoolEntry) - -EndBatch = _reflection.GeneratedProtocolMessageType('EndBatch', (_message.Message,), { - - 'TagsEntry' : _reflection.GeneratedProtocolMessageType('TagsEntry', (_message.Message,), { - 'DESCRIPTOR' : _ENDBATCH_TAGSENTRY, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.EndBatch.TagsEntry) - }) - , - 'DESCRIPTOR' : _ENDBATCH, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.EndBatch) - }) -_sym_db.RegisterMessage(EndBatch) -_sym_db.RegisterMessage(EndBatch.TagsEntry) - -Request = _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), { - 'DESCRIPTOR' : _REQUEST, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Request) - }) -_sym_db.RegisterMessage(Request) - -Response = _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), { - 'DESCRIPTOR' : _RESPONSE, - '__module__' : 'udf_pb2' - # @@protoc_insertion_point(class_scope:agent.Response) - }) -_sym_db.RegisterMessage(Response) - - -DESCRIPTOR._options = None -_INFORESPONSE_OPTIONSENTRY._options = None -_BEGINBATCH_TAGSENTRY._options = None -_POINT_TAGSENTRY._options = None -_POINT_FIELDSDOUBLEENTRY._options = None -_POINT_FIELDSINTENTRY._options = None -_POINT_FIELDSSTRINGENTRY._options = None -_POINT_FIELDSBOOLENTRY._options = None -_ENDBATCH_TAGSENTRY._options = None +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tudf.proto\x12\x05\x61gent\"\r\n\x0bInfoRequest\"\xc7\x01\n\x0cInfoResponse\x12\x1e\n\x05wants\x18\x01 \x01(\x0e\x32\x0f.agent.EdgeType\x12!\n\x08provides\x18\x02 \x01(\x0e\x32\x0f.agent.EdgeType\x12\x31\n\x07options\x18\x03 \x03(\x0b\x32 .agent.InfoResponse.OptionsEntry\x1a\x41\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.agent.OptionInfo:\x02\x38\x01\"2\n\nOptionInfo\x12$\n\nvalueTypes\x18\x01 \x03(\x0e\x32\x10.agent.ValueType\"M\n\x0bInitRequest\x12\x1e\n\x07options\x18\x01 \x03(\x0b\x32\r.agent.Option\x12\x0e\n\x06taskID\x18\x02 \x01(\t\x12\x0e\n\x06nodeID\x18\x03 \x01(\t\":\n\x06Option\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x06values\x18\x02 \x03(\x0b\x32\x12.agent.OptionValue\"\xa6\x01\n\x0bOptionValue\x12\x1e\n\x04type\x18\x01 \x01(\x0e\x32\x10.agent.ValueType\x12\x13\n\tboolValue\x18\x02 \x01(\x08H\x00\x12\x12\n\x08intValue\x18\x03 \x01(\x03H\x00\x12\x15\n\x0b\x64oubleValue\x18\x04 \x01(\x01H\x00\x12\x15\n\x0bstringValue\x18\x05 \x01(\tH\x00\x12\x17\n\rdurationValue\x18\x06 \x01(\x03H\x00\x42\x07\n\x05value\".\n\x0cInitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x11\n\x0fSnapshotRequest\"$\n\x10SnapshotResponse\x12\x10\n\x08snapshot\x18\x01 \x01(\x0c\"\"\n\x0eRestoreRequest\x12\x10\n\x08snapshot\x18\x01 \x01(\x0c\"1\n\x0fRestoreResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\" \n\x10KeepaliveRequest\x12\x0c\n\x04time\x18\x01 \x01(\x03\"!\n\x11KeepaliveResponse\x12\x0c\n\x04time\x18\x01 \x01(\x03\"\x1e\n\rErrorResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"\x9f\x01\n\nBeginBatch\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\t\x12)\n\x04tags\x18\x03 \x03(\x0b\x32\x1b.agent.BeginBatch.TagsEntry\x12\x0c\n\x04size\x18\x04 \x01(\x03\x12\x0e\n\x06\x62yName\x18\x05 \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf1\x04\n\x05Point\x12\x0c\n\x04time\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x03 \x01(\t\x12\x17\n\x0fretentionPolicy\x18\x04 \x01(\t\x12\r\n\x05group\x18\x05 \x01(\t\x12\x12\n\ndimensions\x18\x06 \x03(\t\x12$\n\x04tags\x18\x07 \x03(\x0b\x32\x16.agent.Point.TagsEntry\x12\x34\n\x0c\x66ieldsDouble\x18\x08 \x03(\x0b\x32\x1e.agent.Point.FieldsDoubleEntry\x12.\n\tfieldsInt\x18\t \x03(\x0b\x32\x1b.agent.Point.FieldsIntEntry\x12\x34\n\x0c\x66ieldsString\x18\n \x03(\x0b\x32\x1e.agent.Point.FieldsStringEntry\x12\x30\n\nfieldsBool\x18\x0c \x03(\x0b\x32\x1c.agent.Point.FieldsBoolEntry\x12\x0e\n\x06\x62yName\x18\x0b \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x46ieldsDoubleEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x30\n\x0e\x46ieldsIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x33\n\x11\x46ieldsStringEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0f\x46ieldsBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"\x9b\x01\n\x08\x45ndBatch\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\t\x12\x0c\n\x04tmax\x18\x03 \x01(\x03\x12\'\n\x04tags\x18\x04 \x03(\x0b\x32\x19.agent.EndBatch.TagsEntry\x12\x0e\n\x06\x62yName\x18\x05 \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc3\x02\n\x07Request\x12\"\n\x04info\x18\x01 \x01(\x0b\x32\x12.agent.InfoRequestH\x00\x12\"\n\x04init\x18\x02 \x01(\x0b\x32\x12.agent.InitRequestH\x00\x12,\n\tkeepalive\x18\x03 \x01(\x0b\x32\x17.agent.KeepaliveRequestH\x00\x12*\n\x08snapshot\x18\x04 \x01(\x0b\x32\x16.agent.SnapshotRequestH\x00\x12(\n\x07restore\x18\x05 \x01(\x0b\x32\x15.agent.RestoreRequestH\x00\x12\"\n\x05\x62\x65gin\x18\x10 \x01(\x0b\x32\x11.agent.BeginBatchH\x00\x12\x1d\n\x05point\x18\x11 \x01(\x0b\x32\x0c.agent.PointH\x00\x12\x1e\n\x03\x65nd\x18\x12 \x01(\x0b\x32\x0f.agent.EndBatchH\x00\x42\t\n\x07message\"\xf0\x02\n\x08Response\x12#\n\x04info\x18\x01 \x01(\x0b\x32\x13.agent.InfoResponseH\x00\x12#\n\x04init\x18\x02 \x01(\x0b\x32\x13.agent.InitResponseH\x00\x12-\n\tkeepalive\x18\x03 \x01(\x0b\x32\x18.agent.KeepaliveResponseH\x00\x12+\n\x08snapshot\x18\x04 \x01(\x0b\x32\x17.agent.SnapshotResponseH\x00\x12)\n\x07restore\x18\x05 \x01(\x0b\x32\x16.agent.RestoreResponseH\x00\x12%\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x14.agent.ErrorResponseH\x00\x12\"\n\x05\x62\x65gin\x18\x10 \x01(\x0b\x32\x11.agent.BeginBatchH\x00\x12\x1d\n\x05point\x18\x11 \x01(\x0b\x32\x0c.agent.PointH\x00\x12\x1e\n\x03\x65nd\x18\x12 \x01(\x0b\x32\x0f.agent.EndBatchH\x00\x42\t\n\x07message*!\n\x08\x45\x64geType\x12\n\n\x06STREAM\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01*D\n\tValueType\x12\x08\n\x04\x42OOL\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0c\n\x08\x44URATION\x10\x04\x42\tZ\x07.;agentb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'udf_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z\007.;agent' + _INFORESPONSE_OPTIONSENTRY._options = None + _INFORESPONSE_OPTIONSENTRY._serialized_options = b'8\001' + _BEGINBATCH_TAGSENTRY._options = None + _BEGINBATCH_TAGSENTRY._serialized_options = b'8\001' + _POINT_TAGSENTRY._options = None + _POINT_TAGSENTRY._serialized_options = b'8\001' + _POINT_FIELDSDOUBLEENTRY._options = None + _POINT_FIELDSDOUBLEENTRY._serialized_options = b'8\001' + _POINT_FIELDSINTENTRY._options = None + _POINT_FIELDSINTENTRY._serialized_options = b'8\001' + _POINT_FIELDSSTRINGENTRY._options = None + _POINT_FIELDSSTRINGENTRY._serialized_options = b'8\001' + _POINT_FIELDSBOOLENTRY._options = None + _POINT_FIELDSBOOLENTRY._serialized_options = b'8\001' + _ENDBATCH_TAGSENTRY._options = None + _ENDBATCH_TAGSENTRY._serialized_options = b'8\001' + _EDGETYPE._serialized_start=2535 + _EDGETYPE._serialized_end=2568 + _VALUETYPE._serialized_start=2570 + _VALUETYPE._serialized_end=2638 + _INFOREQUEST._serialized_start=20 + _INFOREQUEST._serialized_end=33 + _INFORESPONSE._serialized_start=36 + _INFORESPONSE._serialized_end=235 + _INFORESPONSE_OPTIONSENTRY._serialized_start=170 + _INFORESPONSE_OPTIONSENTRY._serialized_end=235 + _OPTIONINFO._serialized_start=237 + _OPTIONINFO._serialized_end=287 + _INITREQUEST._serialized_start=289 + _INITREQUEST._serialized_end=366 + _OPTION._serialized_start=368 + _OPTION._serialized_end=426 + _OPTIONVALUE._serialized_start=429 + _OPTIONVALUE._serialized_end=595 + _INITRESPONSE._serialized_start=597 + _INITRESPONSE._serialized_end=643 + _SNAPSHOTREQUEST._serialized_start=645 + _SNAPSHOTREQUEST._serialized_end=662 + _SNAPSHOTRESPONSE._serialized_start=664 + _SNAPSHOTRESPONSE._serialized_end=700 + _RESTOREREQUEST._serialized_start=702 + _RESTOREREQUEST._serialized_end=736 + _RESTORERESPONSE._serialized_start=738 + _RESTORERESPONSE._serialized_end=787 + _KEEPALIVEREQUEST._serialized_start=789 + _KEEPALIVEREQUEST._serialized_end=821 + _KEEPALIVERESPONSE._serialized_start=823 + _KEEPALIVERESPONSE._serialized_end=856 + _ERRORRESPONSE._serialized_start=858 + _ERRORRESPONSE._serialized_end=888 + _BEGINBATCH._serialized_start=891 + _BEGINBATCH._serialized_end=1050 + _BEGINBATCH_TAGSENTRY._serialized_start=1007 + _BEGINBATCH_TAGSENTRY._serialized_end=1050 + _POINT._serialized_start=1053 + _POINT._serialized_end=1678 + _POINT_TAGSENTRY._serialized_start=1007 + _POINT_TAGSENTRY._serialized_end=1050 + _POINT_FIELDSDOUBLEENTRY._serialized_start=1473 + _POINT_FIELDSDOUBLEENTRY._serialized_end=1524 + _POINT_FIELDSINTENTRY._serialized_start=1526 + _POINT_FIELDSINTENTRY._serialized_end=1574 + _POINT_FIELDSSTRINGENTRY._serialized_start=1576 + _POINT_FIELDSSTRINGENTRY._serialized_end=1627 + _POINT_FIELDSBOOLENTRY._serialized_start=1629 + _POINT_FIELDSBOOLENTRY._serialized_end=1678 + _ENDBATCH._serialized_start=1681 + _ENDBATCH._serialized_end=1836 + _ENDBATCH_TAGSENTRY._serialized_start=1007 + _ENDBATCH_TAGSENTRY._serialized_end=1050 + _REQUEST._serialized_start=1839 + _REQUEST._serialized_end=2162 + _RESPONSE._serialized_start=2165 + _RESPONSE._serialized_end=2533 # @@protoc_insertion_point(module_scope) diff --git a/udf/agent/udf.pb.go b/udf/agent/udf.pb.go index 6451708067..6020d62954 100644 --- a/udf/agent/udf.pb.go +++ b/udf/agent/udf.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.17.3 +// protoc v3.21.7 // source: udf.proto package agent