ndk-greeter-go

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Greeter App in Go

Greeter is a demo Go application demonstrating the key principles of creating applications powered by the SR Linux's NetOps Development Kit. Check learn.srlinux.dev for a complete code walkthrough.

Quickstart

Clone and enter the repository:

git clone https://github.com/srl-labs/ndk-greeter-go.git && \
cd ndk-greeter-go

Build the application and deploy it to the lab:

./run.sh deploy-all

Once the lab is deployed, the application is automatically onboarded to SR Linux.

Enter the SR Linux CLI:

ssh greeter

Once entered into the SR Linux CLI, you can finde /greeter context available that contains the application's configuration and operational data.

Configure the desired name:

--{ + running }--[  ]--
A:greeter# enter candidate

--{ + candidate shared default }--[  ]--
A:greeter# greeter name srlinux-user

Commit the configuration:

--{ +* candidate shared default }--[  ]--
A:greeter# commit now
All changes have been committed. Leaving candidate mode.

The application will now greet you when you list its operational state:

--{ + running }--[  ]--
A:greeter# info from state greeter
    greeter {
        name srlinux-user
        greeting "👋 Hello srlinux-user, I was last booted at 2023-11-26T10:24:27.374Z"
    }

Shell autocompletions

To get bash autocompletions for ./run.sh functions:

source ./run.sh

Documentation

Overview

Main package. --8<-- [start:pkg-main]

Directories

Path Synopsis
--8<-- [start:pkg-greeter]
--8<-- [start:pkg-greeter]

Jump to

Keyboard shortcuts

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