nicotypes

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NICo

type NICo struct {
	Client *client.NICoCoreAtomicClient
	State  *State
}

NICo represents the gRPC client for NICo and state

func NewNICoInstance

func NewNICoInstance() *NICo

NewNICoInstance creates a new instance of NICo

func (*NICo) GetClient

func (c *NICo) GetClient() *client.NICoCoreClient

GetClient returns the NICo client

type State

type State struct {
	// GrpcFail the number of times the rpc has failed
	GrpcFail atomic.Uint64
	// GrpcSucc the number of times the rpc has succeeded
	GrpcSucc atomic.Uint64
	// HealthStatus current health state
	HealthStatus atomic.Uint64
	// Err is error message
	Err string
	// WflowMetrics workflow metrics
	WflowMetrics WorkflowMetrics
}

State - NICo state

type WorkflowMetrics

type WorkflowMetrics interface {
	// RecordLatency function to record latency for a workflow
	RecordLatency(activity string, status WorkflowStatus, duration time.Duration)
}

WorkflowMetrics defines interface to be used for workflow metrics

type WorkflowStatus

type WorkflowStatus string
const (
	// WorkflowStatusSuccess workflow has completed successfully
	WorkflowStatusSuccess WorkflowStatus = "Success"
	// WorkflowStatusActFailed workflow activity execution has failed
	WorkflowStatusActivityFailed WorkflowStatus = "ActivityFailed"
	// WorkflowStatusPubFailed workflow status publish failed
	WorkflowStatusPublishFailed WorkflowStatus = "PublishFailed"
	// WorkflowStatusActPubFailed both workflow activity execution and status publish failed
	WorkflowStatusActivityPublishFailed WorkflowStatus = "ActivityPublishFailed"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL