src: Add DMA localagent
[barometer.git] / src / dma / pkg / common / types.go
1 /*
2  * Copyright 2018 NEC Corporation
3  *
4  *   Licensed under the Apache License, Version 2.0 (the "License");
5  *   you may not use this file except in compliance with the License.
6  *   You may obtain a copy of the License at
7  *
8  *       http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *   Unless required by applicable law or agreed to in writing, software
11  *   distributed under the License is distributed on an "AS IS" BASIS,
12  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *   See the License for the specific language governing permissions and
14  *   limitations under the License.
15  */
16
17 package common
18
19 // redisLabel is prefix of local-agent for redis
20 const redisLabel = "barometer-dma"
21
22 // Pool is an interface of DB pool to annotate.
23 // e.g. Set("virt_name/instance-00000001", "{"OS-name": "testvm1"}")
24 // e.g. Set("virt_if/tap1e793b2b-8e", "{"OS-uuid": "df846647-c16a-4d8a-842a-ac39bd4a971e"}")
25 type Pool interface {
26         Set(string, string) error   // (key, JsonData)
27         Get(string) (string, error) // (key, infoName)
28         Del(string) error           // (key)
29 }