Documentation ¶
Overview ¶
--8<-- [start:pkg-greeter]
Index ¶
Constants ¶
View Source
const (
AppName = "greeter"
)
--8<-- [start:pkg-greeter-const].
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Name string AppID uint32 // NDK Service clients SDKMgrServiceClient ndk.SdkMgrServiceClient NotificationServiceClient ndk.SdkNotificationServiceClient TelemetryServiceClient ndk.SdkMgrTelemetryServiceClient // contains filtered or unexported fields }
App is the greeter application struct. --8<-- [start:app-struct].
func NewApp ¶
NewApp creates a new Greeter App instance and connects to NDK socket. It also creates the NDK service clients and registers the agent with NDK. --8<-- [start:new-app].
func (*App) StartConfigNotificationStream ¶
func (a *App) StartConfigNotificationStream(ctx context.Context) chan *ndk.NotificationStreamResponse
StartConfigNotificationStream starts a notification stream for Config service notifications. --8<-- [start:start-cfg-notif-stream].
type ConfigState ¶
type ConfigState struct { // Name is the name to use in the greeting. Name string `json:"name,omitempty"` // Greeting is the greeting message to be displayed. Greeting string `json:"greeting,omitempty"` }
ConfigState holds the application configuration and state. --8<-- [start:configstate-struct].
Click to show internal directories.
Click to hide internal directories.