Documentation ¶
Index ¶
- type ContextBoxConnector
- func (c *ContextBoxConnector) Connect() error
- func (c *ContextBoxConnector) DeleteConfig(configName string) error
- func (c *ContextBoxConnector) Disconnect() error
- func (c *ContextBoxConnector) GetAllConfigs() ([]*pb.Config, error)
- func (c *ContextBoxConnector) PerformHealthCheck() error
- func (c *ContextBoxConnector) SaveConfig(config *pb.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextBoxConnector ¶
type ContextBoxConnector struct {
// contains filtered or unexported fields
}
Communicates with the gRPC server of context-box microservice
func NewContextBoxConnector ¶
func NewContextBoxConnector(connectionUri string) *ContextBoxConnector
NewContextBoxConnector creates and returns an instance of the ContextBoxConnector struct
func (*ContextBoxConnector) Connect ¶
func (c *ContextBoxConnector) Connect() error
Connect creates a gRPC connection to the context-box microservice. If the connection is established, then performs a healthcheck.
func (*ContextBoxConnector) DeleteConfig ¶
func (c *ContextBoxConnector) DeleteConfig(configName string) error
DeleteConfig sends request to the context-box microservice, to delete a config with the given id, from context-box DB.
func (*ContextBoxConnector) Disconnect ¶
func (c *ContextBoxConnector) Disconnect() error
Disconnect closes the gRPC connection to context-box microservice
func (*ContextBoxConnector) GetAllConfigs ¶
func (c *ContextBoxConnector) GetAllConfigs() ([]*pb.Config, error)
GetAllConfigs fetches all configs present in context-box DB
func (*ContextBoxConnector) PerformHealthCheck ¶
func (c *ContextBoxConnector) PerformHealthCheck() error
PerformHealthCheck checks health of the underlying gRPC connection to context-box microservice
func (*ContextBoxConnector) SaveConfig ¶
func (c *ContextBoxConnector) SaveConfig(config *pb.Config) error
SaveConfig sends request to the context-box microservice, to save a config in context-box DB.