Documentation
ΒΆ
Overview ΒΆ
package magistrala acts as an umbrella package containing multiple different microservices and defines all shared domain concepts. For detailed documentation of the platform, please visit https://magistrala.absmach.eu/docs/.
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
View Source
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/absmach/magistrala.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/absmach/magistrala.Commit=ffffffff'". Commit = "ffffffff" // BuildTime represetns the service build time. // It's meant to be set using go build ldflags: // -ldflags "-X 'github.com/absmach/magistrala.BuildTime=1970-01-01_00:00:00'". BuildTime = "1970-01-01_00:00:00" )
Functions ΒΆ
func Health ΒΆ
func Health(service, instanceID string) http.HandlerFunc
Health exposes an HTTP handler for retrieving service health.
Types ΒΆ
type HealthInfo ΒΆ
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"`
// InstanceID contains the ID of the current service instance
InstanceID string `json:"instance_id"`
}
HealthInfo contains version endpoint response.
type IDProvider ΒΆ
IDProvider specifies an API for generating unique identifiers.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
Package api contains commonly used constants and functions for the HTTP and gRPC API.
|
Package api contains commonly used constants and functions for the HTTP and gRPC API. |
|
http
Package api contains commonly used constants and functions for the HTTP API.
|
Package api contains commonly used constants and functions for the HTTP API. |
|
Package bootstrap contains the domain concept definitions needed to support Magistrala bootstrap service functionality.
|
Package bootstrap contains the domain concept definitions needed to support Magistrala bootstrap service functionality. |
|
api
Package api contains implementation of bootstrap service HTTP API.
|
Package api contains implementation of bootstrap service HTTP API. |
|
events
Package events provides the domain concept definitions needed to support bootstrap events functionality.
|
Package events provides the domain concept definitions needed to support bootstrap events functionality. |
|
events/producer
Package producer contains the domain events needed to support event sourcing of Bootstrap service actions.
|
Package producer contains the domain events needed to support event sourcing of Bootstrap service actions. |
|
postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
|
Package postgres contains repository implementations using PostgreSQL as the underlying database. |
|
tracing
Package tracing provides tracing instrumentation for Magistrala Users service.
|
Package tracing provides tracing instrumentation for Magistrala Users service. |
|
pki
Package pki wraps OpenBao client for PKI operations
|
Package pki wraps OpenBao client for PKI operations |
|
Package cli contains the domain concept definitions needed to support Magistrala CLI functionality.
|
Package cli contains the domain concept definitions needed to support Magistrala CLI functionality. |
|
cmd
|
|
|
bootstrap
command
Package main contains bootstrap main function to start the bootstrap service.
|
Package main contains bootstrap main function to start the bootstrap service. |
|
certs
command
|
|
|
cli
command
|
|
|
fluxmq
command
Package main contains the FluxMQ auth bridge service entry point.
|
Package main contains the FluxMQ auth bridge service entry point. |
|
postgres-reader
command
Package main contains postgres-reader main function to start the postgres-reader service.
|
Package main contains postgres-reader main function to start the postgres-reader service. |
|
postgres-writer
command
Package main contains postgres-writer main function to start the postgres-writer service.
|
Package main contains postgres-writer main function to start the postgres-writer service. |
|
timescale-reader
command
Package main contains timescale-reader main function to start the timescale-reader service.
|
Package main contains timescale-reader main function to start the timescale-reader service. |
|
timescale-writer
command
Package main contains timescale-writer main function to start the timescale-writer service.
|
Package main contains timescale-writer main function to start the timescale-writer service. |
|
Package consumers contain the domain concept definitions needed to support Magistrala consumer services functionality.
|
Package consumers contain the domain concept definitions needed to support Magistrala consumer services functionality. |
|
notifiers
Package notifiers contain the domain concept definitions needed to support Magistrala notifications functionality.
|
Package notifiers contain the domain concept definitions needed to support Magistrala notifications functionality. |
|
notifiers/api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
|
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations. |
|
notifiers/postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
|
Package postgres contains repository implementations using PostgreSQL as the underlying database. |
|
notifiers/smpp
Package smpp contains the domain concept definitions needed to support Magistrala SMS notifications.
|
Package smpp contains the domain concept definitions needed to support Magistrala SMS notifications. |
|
notifiers/tracing
Package tracing provides tracing instrumentation for Magistrala WebSocket adapter service.
|
Package tracing provides tracing instrumentation for Magistrala WebSocket adapter service. |
|
writers
Package writers contain the domain concept definitions needed to support Magistrala writer services functionality.
|
Package writers contain the domain concept definitions needed to support Magistrala writer services functionality. |
|
writers/api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
|
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations. |
|
writers/postgres
Package postgres contains repository implementations using Postgres as the underlying database.
|
Package postgres contains repository implementations using Postgres as the underlying database. |
|
writers/timescale
Package timescale contains repository implementations using Timescale as the underlying database.
|
Package timescale contains repository implementations using Timescale as the underlying database. |
|
fluxmq
|
|
|
api/grpc
Package grpc contains the FluxMQ auth callout gRPC server implementation.
|
Package grpc contains the FluxMQ auth callout gRPC server implementation. |
|
api/http
Package http exposes user-authenticated message publishing for the MG UI.
|
Package http exposes user-authenticated message publishing for the MG UI. |
|
internal
|
|
|
drivers
Package drivers contains shared infrastructure helpers for services such as Postgres, Redis, gRPC, and Jaeger.
|
Package drivers contains shared infrastructure helpers for services such as Postgres, Redis, gRPC, and Jaeger. |
|
drivers/redis
Package redis contains the domain concept definitions needed to support Magistrala redis cache functionality.
|
Package redis contains the domain concept definitions needed to support Magistrala redis cache functionality. |
|
nullable
Package nullable contains nullable types used to handle scenarios where default values can't be used to indicate empty, and we want to avoid using pointers for that.
|
Package nullable contains nullable types used to handle scenarios where default values can't be used to indicate empty, and we want to avoid using pointers for that. |
|
Package logger contains logger API definition, wrapper that can be used around any other logger.
|
Package logger contains logger API definition, wrapper that can be used around any other logger. |
|
Package pkg contains library packages used by Magistrala services and external services that integrate with Magistrala.
|
Package pkg contains library packages used by Magistrala services and external services that integrate with Magistrala. |
|
atom
Package atom provides the shared Atom authentication, authorization, projection, bootstrap, and service-token integration used by Magistrala Community and Enterprise services.
|
Package atom provides the shared Atom authentication, authorization, projection, bootstrap, and service-token integration used by Magistrala Community and Enterprise services. |
|
atom/events
Package events consumes the workspace events Atom publishes from its transactional outbox (absmach/atom migrations/004_event_outbox.sql, src/events/publisher.rs) and turns them into cache invalidation, nothing else (MG-14).
|
Package events consumes the workspace events Atom publishes from its transactional outbox (absmach/atom migrations/004_event_outbox.sql, src/events/publisher.rs) and turns them into cache invalidation, nothing else (MG-14). |
|
channels/events
Package events provides the events sourcing of channels to provide replication in other service and definitions needed to support it
|
Package events provides the events sourcing of channels to provide replication in other service and definitions needed to support it |
|
devices/events
Package events provides the events sourcing of devices to provide replication in other service and definitions needed to support it
|
Package events provides the events sourcing of devices to provide replication in other service and definitions needed to support it |
|
email
Package email contains the domain concept definitions needed to support Magistrala email functionality.
|
Package email contains the domain concept definitions needed to support Magistrala email functionality. |
|
errors
Package errors contains Magistrala errors definitions.
|
Package errors contains Magistrala errors definitions. |
|
events/redis
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality.
|
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality. |
|
groups/events
Package events provides the events sourcing of groups to provide listing in clients and channels concept definitions needed to support
|
Package events provides the events sourcing of groups to provide listing in clients and channels concept definitions needed to support |
|
grpcclient
Package auth contains the domain concept definitions needed to support Magistrala auth functionality.
|
Package auth contains the domain concept definitions needed to support Magistrala auth functionality. |
|
jaeger
Package jaeger contains the domain concept definitions needed to support Magistrala Jaeger tracing functionality.
|
Package jaeger contains the domain concept definitions needed to support Magistrala Jaeger tracing functionality. |
|
messaging/mqtt
Package mqtt hold the implementation of the Publisher and PubSub interfaces for the MQTT messaging system, the internal messaging broker of the Magistrala IoT platform.
|
Package mqtt hold the implementation of the Publisher and PubSub interfaces for the MQTT messaging system, the internal messaging broker of the Magistrala IoT platform. |
|
messaging/tracing
Package tracing provides tracing instrumentation for Magistrala clients policies service.
|
Package tracing provides tracing instrumentation for Magistrala clients policies service. |
|
policies
Package policies contains Magistrala policy definitions.
|
Package policies contains Magistrala policy definitions. |
|
postgres
Package postgres contains the domain concept definitions needed to support Magistrala PostgreSQL database functionality.
|
Package postgres contains the domain concept definitions needed to support Magistrala PostgreSQL database functionality. |
|
prometheus
Package prometheus provides a framework for defining and collecting metrics for prometheus.
|
Package prometheus provides a framework for defining and collecting metrics for prometheus. |
|
readersclient
Package readersclient provides the public gRPC client used to read messages from Community-owned reader services.
|
Package readersclient provides the public gRPC client used to read messages from Community-owned reader services. |
|
sdk
Package sdk contains Magistrala SDK.
|
Package sdk contains Magistrala SDK. |
|
server
Package server contains the HTTP, gRPC and CoAP server implementation.
|
Package server contains the HTTP, gRPC and CoAP server implementation. |
|
server/coap
Package coap contains the CoAP server implementation.
|
Package coap contains the CoAP server implementation. |
|
server/grpc
Package grpc contains the gRPC server implementation.
|
Package grpc contains the gRPC server implementation. |
|
server/http
Package http contains the HTTP server implementation.
|
Package http contains the HTTP server implementation. |
|
sid
Package ulid contains ULID generator.
|
Package ulid contains ULID generator. |
|
transformers
Package transformers contains the domain concept definitions needed to support Magistrala transformer services functionality.
|
Package transformers contains the domain concept definitions needed to support Magistrala transformer services functionality. |
|
transformers/json
Package json contains JSON transformer.
|
Package json contains JSON transformer. |
|
transformers/senml
Package senml contains SenML transformer.
|
Package senml contains SenML transformer. |
|
ulid
Package ulid contains ULID generator.
|
Package ulid contains ULID generator. |
|
uuid
Package uuid contains UUID generator.
|
Package uuid contains UUID generator. |
|
Package readers provides a set of readers for various formats.
|
Package readers provides a set of readers for various formats. |
|
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
|
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations. |
|
api/grpc
Package grpc contains implementation of Readers service gRPC API.
|
Package grpc contains implementation of Readers service gRPC API. |
|
middleware
Package middleware provides middleware for Magistrala Readers service.
|
Package middleware provides middleware for Magistrala Readers service. |
|
pgutil
Package pgutil holds the message-reader query building blocks shared by readers/postgres and readers/timescale.
|
Package pgutil holds the message-reader query building blocks shared by readers/postgres and readers/timescale. |
|
postgres
Package postgres contains repository implementations using Postgres as the underlying database.
|
Package postgres contains repository implementations using Postgres as the underlying database. |
|
timescale
Package timescale contains repository implementations using Timescale as the underlying database.
|
Package timescale contains repository implementations using Timescale as the underlying database. |
|
Package tools contains tools for Magistrala.
|
Package tools contains tools for Magistrala. |
|
atom-migration
command
Command atom-migration migrates a Magistrala v0.30.0 deployment (per-service Postgres databases) into a single Atom IAM Postgres database.
|
Command atom-migration migrates a Magistrala v0.30.0 deployment (per-service Postgres databases) into a single Atom IAM Postgres database. |
|
mqtt-bench
Package bench contains benchmarking tool for MQTT broker.
|
Package bench contains benchmarking tool for MQTT broker. |
|
mqtt-bench/cmd
command
Package main contains the entry point of the mqtt-bench tool.
|
Package main contains the entry point of the mqtt-bench tool. |
Click to show internal directories.
Click to hide internal directories.