Remove ping endpoint and svc func

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
This commit is contained in:
Darko Draskovic
2023-03-28 15:06:42 +02:00
parent 8831a4f957
commit 122b214299
28 changed files with 2106 additions and 1052 deletions
-4
View File
@@ -48,10 +48,6 @@ curl -i -X POST -H "Content-Type: application/json" localhost:9022/mfxkit -d '{"
```
## cURL
```sh
curl -i -X POST -H "Content-Type: application/json" localhost:9021/ping -d '{"secret":"secret"}'
```
```sh
curl -i -X POST -H "Content-Type: application/json" localhost:9021/domain -d '{"pool":"/home/darko/go/src/github.com/ultravioletrs/manager/cmd/manager/xml/pool.xml", "volume":"/home/darko/go/src/github.com/ultravioletrs/manager/cmd/manager/xml/vol.xml", "domain":"/home/darko/go/src/github.com/ultravioletrs/manager/cmd/manager/xml/dom.xml"}'
```
+5 -19
View File
@@ -6,44 +6,30 @@ require (
github.com/digitalocean/go-libvirt v0.0.0-20221205150000-2939327a8519
github.com/go-kit/kit v0.12.0
github.com/go-zoo/bone v1.3.0
github.com/mainflux/mainflux v0.12.0
github.com/golang/protobuf v1.5.2
github.com/mainflux/mainflux v0.0.0-20220415135135-92d8fb99bf82
github.com/opentracing/opentracing-go v1.2.0
github.com/prometheus/client_golang v1.14.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
google.golang.org/grpc v1.52.0
google.golang.org/protobuf v1.28.1
)
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
google.golang.org/grpc v1.52.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+6 -762
View File
File diff suppressed because it is too large Load Diff
-13
View File
@@ -26,19 +26,6 @@ func LoggingMiddleware(svc manager.Service, logger log.Logger) manager.Service {
return &loggingMiddleware{logger, svc}
}
func (lm *loggingMiddleware) Ping(secret string) (response string, err error) {
defer func(begin time.Time) {
message := fmt.Sprintf("Method ping for secret %s took %s to complete", secret, time.Since(begin))
if err != nil {
lm.logger.Warn(fmt.Sprintf("%s with error: %s.", message, err))
return
}
lm.logger.Info(fmt.Sprintf("%s without errors.", message))
}(time.Now())
return lm.svc.Ping(secret)
}
func (lm *loggingMiddleware) CreateDomain(pool, volume, domain string) (response string, err error) {
defer func(begin time.Time) {
message := fmt.Sprintf("Method CreateDomain for pool %s, volume %s, and domain %s took %s to complete",
+24
View File
@@ -1 +1,25 @@
package grpc
import (
"context"
"github.com/go-kit/kit/endpoint"
"github.com/ultravioletrs/manager/manager"
)
func createDomainEndpoint(svc manager.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(createDomainReq)
if err := req.validate(); err != nil {
return createDomainRes{}, err
}
name, err := svc.CreateDomain(req.Pool, req.Volume, req.Domain)
if err != nil {
return createDomainRes{}, err
}
return createDomainRes{Name: name}, nil
}
}
+25 -3
View File
@@ -1,10 +1,13 @@
package grpc
import "google.golang.org/protobuf/types/known/timestamppb"
import (
"github.com/ultravioletrs/manager/manager"
"google.golang.org/protobuf/types/known/timestamppb"
)
type HealthRequest struct{}
type healthReq struct{}
type RunRequest struct {
type runReq struct {
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
@@ -18,3 +21,22 @@ type RunRequest struct {
Ttl int32 `protobuf:"varint,12,opt,name=ttl,proto3" json:"ttl,omitempty"`
ResultConsumers []string `protobuf:"bytes,13,rep,name=result_consumers,json=resultConsumers,proto3" json:"result_consumers,omitempty"`
}
type createDomainReq struct {
Pool string `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`
Volume string `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume,omitempty"`
Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
}
func (req createDomainReq) validate() error {
if req.Pool == "" {
return manager.ErrMalformedEntity
}
if req.Volume == "" {
return manager.ErrMalformedEntity
}
if req.Domain == "" {
return manager.ErrMalformedEntity
}
return nil
}
+6 -2
View File
@@ -1,9 +1,13 @@
package grpc
type RunResponse struct {
type runRes struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
type HealthResponse struct {
type healthRes struct {
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}
type createDomainRes struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
-20
View File
@@ -10,26 +10,6 @@ import (
"github.com/ultravioletrs/manager/manager"
)
func pingEndpoint(svc manager.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(pingReq)
if err := req.validate(); err != nil {
return nil, err
}
greeting, err := svc.Ping(req.Secret)
if err != nil {
return nil, err
}
res := pingRes{
Greeting: greeting,
}
return res, nil
}
}
func createDomainEndpoint(svc manager.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(createDomainReq)
-12
View File
@@ -9,18 +9,6 @@ type apiReq interface {
validate() error
}
type pingReq struct {
Secret string `json:"secret"`
}
func (req pingReq) validate() error {
if req.Secret == "" {
return manager.ErrMalformedEntity
}
return nil
}
type createDomainReq struct {
Pool string `json:"pool"`
Volume string `json:"volume"`
+1 -17
View File
@@ -9,23 +9,7 @@ import (
"github.com/mainflux/mainflux"
)
var _ mainflux.Response = (*pingRes)(nil)
type pingRes struct {
Greeting string `json:"greeting"`
}
func (res pingRes) Code() int {
return http.StatusOK
}
func (res pingRes) Headers() map[string]string {
return map[string]string{}
}
func (res pingRes) Empty() bool {
return false
}
var _ mainflux.Response = (*createDomainRes)(nil)
type createDomainRes struct {
Name string `json:"name"`
+1 -21
View File
@@ -38,13 +38,6 @@ func MakeHandler(tracer opentracing.Tracer, svc manager.Service) http.Handler {
r := bone.New()
r.Post("/ping", kithttp.NewServer(
kitot.TraceServer(tracer, "ping")(pingEndpoint(svc)),
decodePing,
encodeResponse,
opts...,
))
r.Post("/domain", kithttp.NewServer(
kitot.TraceServer(tracer, "domain")(createDomainEndpoint(svc)),
decodeCreateDomain,
@@ -52,25 +45,12 @@ func MakeHandler(tracer opentracing.Tracer, svc manager.Service) http.Handler {
opts...,
))
r.GetFunc("/version", mainflux.Version("things"))
r.GetFunc("/health", mainflux.Health("manager"))
r.Handle("/metrics", promhttp.Handler())
return r
}
func decodePing(_ context.Context, r *http.Request) (interface{}, error) {
if !strings.Contains(r.Header.Get("Content-Type"), contentType) {
return nil, errUnsupportedContentType
}
req := pingReq{}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
return nil, err
}
return req, nil
}
func decodeCreateDomain(_ context.Context, r *http.Request) (interface{}, error) {
if !strings.Contains(r.Header.Get("Content-Type"), contentType) {
return nil, errUnsupportedContentType
-9
View File
@@ -31,15 +31,6 @@ func MetricsMiddleware(svc manager.Service, counter metrics.Counter, latency met
}
}
func (ms *metricsMiddleware) Ping(secret string) (response string, err error) {
defer func(begin time.Time) {
ms.counter.With("method", "ping").Add(1)
ms.latency.With("method", "ping").Observe(time.Since(begin).Seconds())
}(time.Now())
return ms.svc.Ping(secret)
}
func (ms *metricsMiddleware) CreateDomain(pool, volume, domain string) (response string, err error) {
defer func(begin time.Time) {
ms.counter.With("method", "CreateDomain").Add(1)
+177 -25
View File
@@ -293,6 +293,116 @@ func (x *RunResponse) GetMessage() string {
return ""
}
type CreateDomainRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pool string `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`
Volume string `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume,omitempty"`
Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
}
func (x *CreateDomainRequest) Reset() {
*x = CreateDomainRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_manager_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateDomainRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateDomainRequest) ProtoMessage() {}
func (x *CreateDomainRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_manager_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateDomainRequest.ProtoReflect.Descriptor instead.
func (*CreateDomainRequest) Descriptor() ([]byte, []int) {
return file_proto_manager_proto_rawDescGZIP(), []int{4}
}
func (x *CreateDomainRequest) GetPool() string {
if x != nil {
return x.Pool
}
return ""
}
func (x *CreateDomainRequest) GetVolume() string {
if x != nil {
return x.Volume
}
return ""
}
func (x *CreateDomainRequest) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
type CreateDomainResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *CreateDomainResponse) Reset() {
*x = CreateDomainResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_manager_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateDomainResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateDomainResponse) ProtoMessage() {}
func (x *CreateDomainResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_manager_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateDomainResponse.ProtoReflect.Descriptor instead.
func (*CreateDomainResponse) Descriptor() ([]byte, []int) {
return file_proto_manager_proto_rawDescGZIP(), []int{5}
}
func (x *CreateDomainResponse) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_proto_manager_proto protoreflect.FileDescriptor
var file_proto_manager_proto_rawDesc = []byte{
@@ -334,18 +444,32 @@ var file_proto_manager_proto_rawDesc = []byte{
0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0x27, 0x0a, 0x0b,
0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x99, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c,
0x74, 0x68, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x3e, 0x0a, 0x03, 0x52, 0x75, 0x6e, 0x12, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67,
0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x59, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c,
0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
0x22, 0x2a, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xf4, 0x01, 0x0a,
0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x47, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x03, 0x52, 0x75, 0x6e, 0x12,
0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67,
0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d,
0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -360,23 +484,27 @@ func file_proto_manager_proto_rawDescGZIP() []byte {
return file_proto_manager_proto_rawDescData
}
var file_proto_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_proto_manager_proto_goTypes = []interface{}{
(*HealthRequest)(nil), // 0: manager_proto.HealthRequest
(*HealthResponse)(nil), // 1: manager_proto.HealthResponse
(*RunRequest)(nil), // 2: manager_proto.RunRequest
(*RunResponse)(nil), // 3: manager_proto.RunResponse
(*timestamp.Timestamp)(nil), // 4: google.protobuf.Timestamp
(*HealthRequest)(nil), // 0: manager_proto.HealthRequest
(*HealthResponse)(nil), // 1: manager_proto.HealthResponse
(*RunRequest)(nil), // 2: manager_proto.RunRequest
(*RunResponse)(nil), // 3: manager_proto.RunResponse
(*CreateDomainRequest)(nil), // 4: manager_proto.CreateDomainRequest
(*CreateDomainResponse)(nil), // 5: manager_proto.CreateDomainResponse
(*timestamp.Timestamp)(nil), // 6: google.protobuf.Timestamp
}
var file_proto_manager_proto_depIdxs = []int32{
4, // 0: manager_proto.RunRequest.start_time:type_name -> google.protobuf.Timestamp
4, // 1: manager_proto.RunRequest.end_time:type_name -> google.protobuf.Timestamp
6, // 0: manager_proto.RunRequest.start_time:type_name -> google.protobuf.Timestamp
6, // 1: manager_proto.RunRequest.end_time:type_name -> google.protobuf.Timestamp
0, // 2: manager_proto.ManagerService.Health:input_type -> manager_proto.HealthRequest
2, // 3: manager_proto.ManagerService.Run:input_type -> manager_proto.RunRequest
1, // 4: manager_proto.ManagerService.Health:output_type -> manager_proto.HealthResponse
3, // 5: manager_proto.ManagerService.Run:output_type -> manager_proto.RunResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
4, // 4: manager_proto.ManagerService.CreateDomain:input_type -> manager_proto.CreateDomainRequest
1, // 5: manager_proto.ManagerService.Health:output_type -> manager_proto.HealthResponse
3, // 6: manager_proto.ManagerService.Run:output_type -> manager_proto.RunResponse
5, // 7: manager_proto.ManagerService.CreateDomain:output_type -> manager_proto.CreateDomainResponse
5, // [5:8] is the sub-list for method output_type
2, // [2:5] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
@@ -436,6 +564,30 @@ func file_proto_manager_proto_init() {
return nil
}
}
file_proto_manager_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateDomainRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_manager_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateDomainResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -443,7 +595,7 @@ func file_proto_manager_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_manager_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
+36
View File
@@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7
type ManagerServiceClient interface {
Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
CreateDomain(ctx context.Context, in *CreateDomainRequest, opts ...grpc.CallOption) (*CreateDomainResponse, error)
}
type managerServiceClient struct {
@@ -48,12 +49,22 @@ func (c *managerServiceClient) Run(ctx context.Context, in *RunRequest, opts ...
return out, nil
}
func (c *managerServiceClient) CreateDomain(ctx context.Context, in *CreateDomainRequest, opts ...grpc.CallOption) (*CreateDomainResponse, error) {
out := new(CreateDomainResponse)
err := c.cc.Invoke(ctx, "/manager_proto.ManagerService/CreateDomain", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ManagerServiceServer is the server API for ManagerService service.
// All implementations must embed UnimplementedManagerServiceServer
// for forward compatibility
type ManagerServiceServer interface {
Health(context.Context, *HealthRequest) (*HealthResponse, error)
Run(context.Context, *RunRequest) (*RunResponse, error)
CreateDomain(context.Context, *CreateDomainRequest) (*CreateDomainResponse, error)
mustEmbedUnimplementedManagerServiceServer()
}
@@ -67,6 +78,9 @@ func (UnimplementedManagerServiceServer) Health(context.Context, *HealthRequest)
func (UnimplementedManagerServiceServer) Run(context.Context, *RunRequest) (*RunResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Run not implemented")
}
func (UnimplementedManagerServiceServer) CreateDomain(context.Context, *CreateDomainRequest) (*CreateDomainResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateDomain not implemented")
}
func (UnimplementedManagerServiceServer) mustEmbedUnimplementedManagerServiceServer() {}
// UnsafeManagerServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -116,6 +130,24 @@ func _ManagerService_Run_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _ManagerService_CreateDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateDomainRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ManagerServiceServer).CreateDomain(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/manager_proto.ManagerService/CreateDomain",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ManagerServiceServer).CreateDomain(ctx, req.(*CreateDomainRequest))
}
return interceptor(ctx, in, info, handler)
}
// ManagerService_ServiceDesc is the grpc.ServiceDesc for ManagerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -131,6 +163,10 @@ var ManagerService_ServiceDesc = grpc.ServiceDesc{
MethodName: "Run",
Handler: _ManagerService_Run_Handler,
},
{
MethodName: "CreateDomain",
Handler: _ManagerService_CreateDomain_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/manager.proto",
-9
View File
@@ -32,8 +32,6 @@ var (
// Service specifies an API that must be fullfiled by the domain service
// implementation, and all of its decorators (e.g. logging & metrics).
type Service interface {
// Ping compares a given string with secret
Ping(string) (string, error)
CreateDomain(pool, volume, domain string) (string, error)
}
@@ -52,13 +50,6 @@ func New(secret string, libvirtConn *libvirt.Libvirt) Service {
}
}
func (ks *managerService) Ping(secret string) (string, error) {
if ks.secret != secret {
return "", ErrUnauthorizedAccess
}
return "Hello World :)", nil
}
func (ks *managerService) CreateDomain(poolXML, volXML, domXML string) (string, error) {
poolBytes, err := os.ReadFile(poolXML)
if err != nil {
+9
View File
@@ -9,6 +9,7 @@ option go_package = "./manager";
service ManagerService {
rpc Health(HealthRequest) returns (HealthResponse) {}
rpc Run(RunRequest) returns (RunResponse) {}
rpc CreateDomain(CreateDomainRequest) returns (CreateDomainResponse) {}
}
message HealthRequest {}
@@ -30,3 +31,11 @@ message RunRequest {
}
message RunResponse { string message = 1; }
message CreateDomainRequest {
string pool = 1;
string volume = 2;
string domain = 3;
}
message CreateDomainResponse { string name = 1; }
+92
View File
@@ -11,6 +11,98 @@ Otherwise, whole log in a similar format can be observed via:
git log --pretty=oneline --abbrev-commit
```
## 0.13.0 - 15. APR 2022.
### Features and Bugfixes
- NOISSUE - Update changelog for release 0.13.0
- Update VerneMQ release (#1593)
- NOISSUE - Update changelog and readme for release 0.13.0
- MF-1582 - Fix lora-adapter MQTT client (#1583)
- NOISSUE - Fix CoAP adapter (#1572)
- NOISSUE - Unify MF_INFLUX_READER_DB_HOST and MF_INFLUX_WRITER_DB_HOST envars (#1585)
- MF-1580 - Influxdb Writer changes format of update-time to string (#1581)
- MF-1575 Add 'Name' field to ListMembers response in things svc (#1576)
- MF-1565 - Document Bearer, Thing and Basic Authorization header (#1566)
- MF-1567 - Use Bearer, Thing or Basic scheme in Authorization header (#1568)
- MF-1348 - Add transport errors logging (#1544)
- NOISSUE - Add nats wrapper for COAP (#1569)
- MF-1469 - Indicate proper authentication scheme in Authorization header (#1523)
- MF-1240 - Return to service transport layer only service errors (#1559)
- Update dependencies (#1564)
- NOISSUE - Separate Keto hosts for read and write (#1563)
- MF-1551 - Fix Cobra usage commands and clean unnecessary struct types (#1558)
- MF-1257 - Access messages from readers endpoint with user access token (#1470)
- NOISSUE - Refactor MQTT subscriber (#1561)
- MF-1059 - Add TLS support for email (#1560)
- MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538)
- NOISSUE - Fix auth members list response (#1555)
- MF-1263 - Move repeating errors to the separate package (#1540)
- NOISSUE - Add API keys functions to CLI (#1537)
- Fix SDK for group members (#1553)
- NOISSUE - Fix Swagger UI (#1552)
- MF-1008 - Make token duration configurable (#1550)
- MF-1308 - Use IETF Health Check standard (#1541)
- Fix user listing access control (#1546)
- Update dependencies (#1545)
- MF-1478 - TimescaleDB writer and reader add-on (#1542)
- MF-1149 - Add AsyncAPI MQTT API doc (#1539)
- MF-1535 - Add API keys functions to SDK (#1536)
- NOISSUE - Add view and list serials endpoints in certs service (#1483)
- MF-1516 - Fix API key issuing (#1530)
- NOISSUE - Add disconnect endpoint in nginx conf (#1528)
- NOISSUE - Add timestamp transformation rules for specifc JSON fields (#1514)
- MF-1425 - Support external UUIDs for Things and Channels (#1518)
- MF-1521 - Fix email headers (#1522)
- Fix SenML lib dependency version (#1519)
- Bump vernemq to 1.12.3 (#1520)
- NOISSUE - Remove auth URL from SDK (#1511)
- NOISSUE - Apply policies to Channels (#1505)
- remove dead code (#1503)
- NOISSUE - Fix listing (#1502)
- NOISSUE - Listing Policies (#1498)
- Fix standalone mode (#1497)
- MF-1489 - Add API for deleting policies (#1491)
- NOISSUE - Update group sharing policies (#1494)
- NOISSUE - Refactor InfluxDB Reader: explicit check event + add safe conversion (#1460)
- NOISSUE - Update users create command for CLI (#1495)
- NOISSUE - Update self register environment variable name (#1493)
- Bring back the job add
- NOISSUE - Fix assigning invalid group policy (#1487)
- MF-1443 - Add policies (#1482)
- NOISSUE - Fix retrieving all users (#1477)
- MF-1468 - Fix ThingsURL in Certs Service (#1474)
- NOISSUE - Refactor single-user mode (#1471)
- Fix UpdateChannelHandler for Redis producer (#1473)
- NOISSUE - Add SMPP notifier (#1464)
- NOISSUE - Update dependencies (#1453)
- NOISSUE - Fix security warnings for dependencies (#1452)
- Bump docker-compose version in prereq (#1449)
- NOISSUE - Fix bootstraping (#1448)
- MF 1413 - Use per-service URL in SDK (#1444)
- MF-1439 - Add support for Basic Authentication in HTTP Adapter (#1441)
- MF-1421 - Make flattening of JSON transformer only available on InfluxDB (#1432)
- NOISSUE - Update the /disconnect endpoint HTTP method as PUT (#1438)
- MF-1389 - Add /disconnect endpoint in Things service (#1433)
- NOISSUE - Fix httputil implementation in users service (#1434)
- Fix fetching user members of an empty group (#1436)
- Change to user friendly docs urls (#1430)
- NOISSUE - Use github action for showing OpenAPI spec with Swagger UI (#1427)
- Fix JSON Transformer empty format handling (#1429)
- Update README
- NOISSUE - Update docker-compose images to latest release (#1419)
- MF-1378 - Update dependencies (#1379)
## 0.12.1 - 05. MAY 2021.
### Features and Bugfixes
- NOISSUE - Refactor SDK memberships and fix openapi for memberships.
- NOISSUE - Fix incorrect influxdb credentials
- MF-1408 - Fix error handling for Thing update SQL(#1408)
- MF-1288 - Add tests for JSON messages in message writers and readers
- NOISSUE - Fix Postgres Reader order
- NOISSUE - Fix nginx configuration for groups
- NOISSUE - Add tests and connection route-map to lora-adapter
- MF-1403 - Change vernemq building source revision
- NOISSUE - Rm content-type check from list endpoint
## 0.12.0 - 29. MAR 2021.
### Features and Bugfixes
- MF-1394 - SDK groups (#1396)
+14 -13
View File
@@ -4,15 +4,23 @@
MF_DOCKER_IMAGE_NAME_PREFIX ?= mainflux
BUILD_DIR = build
SERVICES = users things http coap lora influxdb-writer influxdb-reader mongodb-writer \
mongodb-reader cassandra-writer cassandra-reader postgres-writer postgres-reader cli \
bootstrap opcua auth twins mqtt provision certs smtp-notifier
mongodb-reader cassandra-writer cassandra-reader postgres-writer postgres-reader timescale-writer timescale-reader cli \
bootstrap opcua auth twins mqtt provision certs smtp-notifier smpp-notifier
DOCKERS = $(addprefix docker_,$(SERVICES))
DOCKERS_DEV = $(addprefix docker_dev_,$(SERVICES))
CGO_ENABLED ?= 0
GOARCH ?= amd64
VERSION ?= $(shell git describe --abbrev=0 --tags)
COMMIT ?= $(shell git rev-parse HEAD)
TIME ?= $(shell date +%F_%T)
define compile_service
CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go build -mod=vendor -ldflags "-s -w" -o ${BUILD_DIR}/mainflux-$(1) cmd/$(1)/main.go
CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) \
go build -mod=vendor -ldflags "-s -w \
-X 'github.com/mainflux/mainflux.BuildTime=$(TIME)' \
-X 'github.com/mainflux/mainflux.Version=$(VERSION)' \
-X 'github.com/mainflux/mainflux.Commit=$(COMMIT)'" \
-o ${BUILD_DIR}/mainflux-$(1) cmd/$(1)/main.go
endef
define make_docker
@@ -23,6 +31,9 @@ define make_docker
--build-arg SVC=$(svc) \
--build-arg GOARCH=$(GOARCH) \
--build-arg GOARM=$(GOARM) \
--build-arg VERSION=$(VERSION) \
--build-arg COMMIT=$(COMMIT) \
--build-arg TIME=$(TIME) \
--tag=$(MF_DOCKER_IMAGE_NAME_PREFIX)/$(svc) \
-f docker/Dockerfile .
endef
@@ -101,13 +112,3 @@ rundev:
run:
docker-compose -f docker/docker-compose.yml up
runlora:
docker-compose \
-f docker/docker-compose.yml \
-f docker/addons/influxdb-writer/docker-compose.yml \
-f docker/addons/lora-adapter/docker-compose.yml up \
# Run all Mainflux core services except distributed tracing system - Jaeger. Recommended on gateways:
rungw:
MF_JAEGER_URL= docker-compose -f docker/docker-compose.yml up --scale jaeger=0
+14 -15
View File
@@ -16,10 +16,6 @@ for building complex IoT solutions.
For more details, check out the [official documentation][docs].
Mainflux is member of the [Linux Foundation][lf] and an active contributor
to the [EdgeX Foundry][edgex] project. It has been made with :heart: by [Mainflux Labs][company],
which maintains the project and offers professional services around it.
## Features
- Multi-protocol connectivity and bridging (HTTP, MQTT, WebSocket and CoAP)
@@ -43,7 +39,7 @@ which maintains the project and offers professional services around it.
The following are needed to run Mainflux:
- [Docker](https://docs.docker.com/install/) (version 20.10)
- [Docker compose](https://docs.docker.com/compose/install/) (version 1.28)
- [Docker compose](https://docs.docker.com/compose/install/) (version 1.29)
Developing Mainflux will also require:
@@ -69,7 +65,7 @@ If you want to run services from specific release checkout code from github and
```bash
git checkout tags/<release_number> -b <release_number>
# e.g. `git checkout tags/0.12.0 -b 0.12.0`
# e.g. `git checkout tags/0.13.0 -b 0.13.0`
```
Check that `.env` file contains:
@@ -78,7 +74,7 @@ Check that `.env` file contains:
MF_RELEASE_TAG=<release_number>
```
>`docker-compose` should be used for development and testing deployments. For production we suggest using [Kubernetes](https://mainflux.readthedocs.io/en/latest/kubernetes/).
>`docker-compose` should be used for development and testing deployments. For production we suggest using [Kubernetes](https://docs.mainflux.io/kubernetes).
## Usage
@@ -91,16 +87,14 @@ make cli
./build/mainflux-cli version
```
Additional details on using the CLI can be found in the [CLI documentation](https://mainflux.readthedocs.io/en/latest/cli/).
Additional details on using the CLI can be found in the [CLI documentation](https://docs.mainflux.io/cli).
## Documentation
Official documentation is hosted at [Mainflux Read The Docs page][docs]. Documentation is auto-generated, checkout the instructions on [official docs repository](https://github.com/mainflux/docs):
Official documentation is hosted at [Mainflux official docs page][docs]. Documentation is auto-generated, checkout the instructions on [official docs repository](https://github.com/mainflux/docs):
If you spot an error or a need for corrections, please let us know - or even better: send us a PR.
Additional practical information, news and tutorials can be found on the [Mainflux blog][blog].
## Authors
Main architect and BDFL of Mainflux project is [@drasko][drasko].
@@ -119,6 +113,12 @@ The Mainflux team would like to give special thanks to [@mijicd][dejan] for his
on designing and implementing a highly improved and optimized version of the platform,
and [@malidukica][dusanm] for his effort on implementing the initial user interface.
## Professional Support
There are many companies offering professional support for the Mainflux system.
If you need this kind of support, best is to reach out to [@drasko][drasko] directly, and he will point you out to the best-matching support team.
## Contributing
Thank you for your interest in Mainflux and the desire to contribute!
@@ -129,10 +129,9 @@ Thank you for your interest in Mainflux and the desire to contribute!
### We're Hiring
If you are interested in working professionally on Mainflux,
please head to company's [careers page][careers] or shoot us an e-mail at <careers@mainflux.com>.
You like Mainflux and you would like to make it your day job? We're always looking for talented engineers interested in open-source, IoT and distributed systems. If you recognize yourself, reach out to [@drasko][drasko] - he will contact you back.
>The best way to grab our attention is by sending PRs :sunglasses:.
>The best way to grab our attention is, of course, by sending PRs :sunglasses:.
## Community
@@ -149,7 +148,7 @@ please head to company's [careers page][careers] or shoot us an e-mail at <caree
[banner]: https://github.com/mainflux/docs/blob/master/docs/img/gopherBanner.jpg
[ci-badge]: https://semaphoreci.com/api/v1/mainflux/mainflux/branches/master/badge.svg
[ci-url]: https://semaphoreci.com/mainflux/mainflux
[docs]: http://mainflux.readthedocs.io
[docs]: https://docs.mainflux.io
[docker]: https://www.docker.com
[forum]: https://groups.google.com/forum/#!forum/mainflux
[gitter]: https://gitter.im/mainflux/mainflux?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+1553 -44
View File
File diff suppressed because it is too large Load Diff
+33
View File
@@ -18,6 +18,9 @@ service AuthService {
rpc Issue(IssueReq) returns (Token) {}
rpc Identify(Token) returns (UserIdentity) {}
rpc Authorize(AuthorizeReq) returns (AuthorizeRes) {}
rpc AddPolicy(AddPolicyReq) returns (AddPolicyRes) {}
rpc DeletePolicy(DeletePolicyReq) returns (DeletePolicyRes) {}
rpc ListPolicies(ListPoliciesReq) returns (ListPoliciesRes) {}
rpc Assign(Assignment) returns(google.protobuf.Empty) {}
rpc Members(MembersReq) returns (MembersRes) {}
}
@@ -73,6 +76,36 @@ message AuthorizeRes {
bool authorized = 1;
}
message AddPolicyReq {
string sub = 1;
string obj = 2;
string act = 3;
}
message AddPolicyRes {
bool authorized = 1;
}
message DeletePolicyReq {
string sub = 1;
string obj = 2;
string act = 3;
}
message DeletePolicyRes {
bool deleted = 1;
}
message ListPoliciesReq {
string sub = 1;
string obj = 2;
string act = 3;
}
message ListPoliciesRes {
repeated string policies = 1;
}
message Assignment {
string token = 1;
string groupID = 2;
+74
View File
@@ -0,0 +1,74 @@
// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package mainflux
import (
"encoding/json"
"net/http"
)
const (
contentType = "Content-Type"
contentTypeJSON = "application/health+json"
svcStatus = "pass"
description = " service"
)
var (
// Version represents the last service git tag in git history.
// It's meant to be set using go build ldflags:
// -ldflags "-X 'github.com/mainflux/mainflux.Version=0.0.0'"
Version = "0.0.0"
// Commit represents the service git commit hash.
// It's meant to be set using go build ldflags:
// -ldflags "-X 'github.com/mainflux/mainflux.Commit=ffffffff'"
Commit = "ffffffff"
// BuildTime represetns the service build time.
// It's meant to be set using go build ldflags:
// -ldflags "-X 'github.com/mainflux/mainflux.BuildTime=1970-01-01_00:00:00'"
BuildTime = "1970-01-01_00:00:00"
)
// HealthInfo contains version endpoint response.
type HealthInfo struct {
// Status contains service status.
Status string `json:"status"`
// Version contains current service version.
Version string `json:"version"`
// Commit represents the git hash commit.
Commit string `json:"commit"`
// Description contains service description.
Description string `json:"description"`
// BuildTime contains service build time.
BuildTime string `json:"build_time"`
}
// Health exposes an HTTP handler for retrieving service health.
func Health(service string) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Add(contentType, contentTypeJSON)
if r.Method != http.MethodGet && r.Method != http.MethodHead {
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
res := HealthInfo{
Status: svcStatus,
Version: Version,
Commit: Commit,
Description: service + description,
BuildTime: BuildTime,
}
w.WriteHeader(http.StatusOK)
if err := json.NewEncoder(w).Encode(res); err != nil {
w.WriteHeader(http.StatusInternalServerError)
}
})
}
+1
View File
@@ -19,6 +19,7 @@ const (
Debug
)
// ErrInvalidLogLevel indicates an unrecognized log level.
var ErrInvalidLogLevel = errors.New("unrecognized log level")
// Level represents severity level while logging.
+2 -1
View File
@@ -5,9 +5,10 @@ package logger
import (
"fmt"
"github.com/go-kit/kit/log"
"io"
"time"
"github.com/go-kit/kit/log"
)
// Logger specifies logging API.
+29
View File
@@ -0,0 +1,29 @@
// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package logger
var _ Logger = (*loggerMock)(nil)
type loggerMock struct{}
// NewMock returns wrapped go kit logger mock.
func NewMock() Logger {
return &loggerMock{}
}
func (l loggerMock) Debug(msg string) {
return
}
func (l loggerMock) Info(msg string) {
return
}
func (l loggerMock) Warn(msg string) {
return
}
func (l loggerMock) Error(msg string) {
return
}
-31
View File
@@ -1,31 +0,0 @@
// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package mainflux
import (
"encoding/json"
"net/http"
)
const version string = "0.12.0"
// VersionInfo contains version endpoint response.
type VersionInfo struct {
// Service contains service name.
Service string `json:"service"`
// Version contains service current version value.
Version string `json:"version"`
}
// Version exposes an HTTP handler for retrieving service version.
func Version(service string) http.HandlerFunc {
return http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) {
res := VersionInfo{service, version}
data, _ := json.Marshal(res)
rw.Write(data)
})
}
+1 -1
View File
@@ -37,7 +37,7 @@ func MustInit(metrics interface{}, factory Factory, globalTags map[string]string
}
}
// Init does the same as Init, but returns an error instead of
// Init does the same as MustInit, but returns an error instead of
// panicking.
func Init(m interface{}, factory Factory, globalTags map[string]string) error {
// Allow user to opt out of reporting metrics by passing in nil.
+3 -31
View File
@@ -12,8 +12,6 @@ github.com/digitalocean/go-libvirt/internal/event
github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2
github.com/digitalocean/go-libvirt/socket
github.com/digitalocean/go-libvirt/socket/dialers
# github.com/fsnotify/fsnotify v1.6.0
## explicit; go 1.16
# github.com/go-kit/kit v0.12.0
## explicit; go 1.17
github.com/go-kit/kit/endpoint
@@ -44,28 +42,18 @@ github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/empty
github.com/golang/protobuf/ptypes/timestamp
# github.com/hashicorp/hcl v1.0.0
## explicit
# github.com/inconshreveable/mousetrap v1.1.0
## explicit; go 1.18
# github.com/magiconair/properties v1.8.7
## explicit; go 1.19
# github.com/mainflux/mainflux v0.12.0
## explicit; go 1.14
# github.com/mainflux/mainflux v0.0.0-20220415135135-92d8fb99bf82
## explicit; go 1.17
github.com/mainflux/mainflux
github.com/mainflux/mainflux/logger
# github.com/matttproud/golang_protobuf_extensions v1.0.1
## explicit
github.com/matttproud/golang_protobuf_extensions/pbutil
# github.com/mitchellh/mapstructure v1.5.0
## explicit; go 1.14
# github.com/opentracing/opentracing-go v1.2.0
## explicit; go 1.14
github.com/opentracing/opentracing-go
github.com/opentracing/opentracing-go/ext
github.com/opentracing/opentracing-go/log
# github.com/pelletier/go-toml/v2 v2.0.6
## explicit; go 1.16
# github.com/pkg/errors v0.9.1
## explicit
github.com/pkg/errors
@@ -87,18 +75,6 @@ github.com/prometheus/common/model
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
github.com/prometheus/procfs/internal/util
# github.com/spf13/afero v1.9.3
## explicit; go 1.16
# github.com/spf13/cast v1.5.0
## explicit; go 1.18
# github.com/spf13/cobra v1.6.1
## explicit; go 1.15
# github.com/spf13/jwalterweatherman v1.1.0
## explicit
# github.com/spf13/pflag v1.0.5
## explicit; go 1.12
# github.com/spf13/viper v1.15.0
## explicit; go 1.17
# github.com/subosito/gotenv v1.4.2
## explicit; go 1.18
github.com/subosito/gotenv
@@ -122,7 +98,7 @@ github.com/uber/jaeger-client-go/thrift-gen/sampling
github.com/uber/jaeger-client-go/thrift-gen/zipkincore
github.com/uber/jaeger-client-go/transport
github.com/uber/jaeger-client-go/utils
# github.com/uber/jaeger-lib v2.0.0+incompatible
# github.com/uber/jaeger-lib v2.4.1+incompatible
## explicit
github.com/uber/jaeger-lib/metrics
# go.uber.org/atomic v1.9.0
@@ -235,7 +211,3 @@ google.golang.org/protobuf/types/known/anypb
google.golang.org/protobuf/types/known/durationpb
google.golang.org/protobuf/types/known/emptypb
google.golang.org/protobuf/types/known/timestamppb
# gopkg.in/ini.v1 v1.67.0
## explicit
# gopkg.in/yaml.v3 v3.0.1
## explicit