Skip to content

Commit

Permalink
Some basic code skeleton
Browse files Browse the repository at this point in the history
Add an agent and config type and start of a CLI implementation
  • Loading branch information
nsmith5 committed Jan 4, 2022
1 parent 40ebd75 commit 384b247
Show file tree
Hide file tree
Showing 5 changed files with 829 additions and 1 deletion.
23 changes: 23 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import "context"

type agent struct {
}

// newAgent constructs an agent from config or bails
func newAgent(c config) (*agent, error) {
return nil, ErrNotImplimented
}

// run starts off the agent. The call blocks or exits returning an error
// if the agent hits a fatal error.
func (a *agent) run() error {
return ErrNotImplimented
}

// shutdown gracefully stops the agent. Shutdown can take an arbitrarily long time. Use
// context cancellation to force shutdown.
func (a *agent) shutdown(context.Context) error {
return ErrNotImplimented
}
4 changes: 4 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package main

type config struct {
}
9 changes: 8 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
module github.com/nsmith5/rekorsidekick
module github.com/nsmith5/rekor-sidekick

go 1.17

require github.com/spf13/cobra v1.3.0

require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
Loading

0 comments on commit 384b247

Please sign in to comment.