-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RSDK-9625] add discover service #65
base: main
Are you sure you want to change the base?
Conversation
|
||
// replace go.viam.com/rdk => /Users/johnnicholson/viam-slam/rdk | ||
|
||
// replace go.viam.com/api => /Users/johnnicholson/viam-slam/api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove before merging
func (cred *Creds) createName(index int) string { | ||
if cred.Username == "" { | ||
return fmt.Sprintf("Camera_Insecure_%v", index) | ||
} | ||
return fmt.Sprintf("Camera_%s_%v", cred.Username, index) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently using the camera's username and the camera number as the name of the resource we surface. Can further separate by url if requested(since cameras appear to have multiple urls)
} | ||
|
||
func (cfg *Config) Validate(deps string) ([]string, error) { | ||
// check that all creds have both usernames and passwords set. Note a credential can have both fields empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if a camera can have only a username or only a password, so I disallowed those combinations
https://viam.atlassian.net/browse/RSDK-9625
adds the discover service. Made it a separate package from the current
viamonvif
to avoid circular dependencies happening and to not break the current discovery workflow that people use.requires this rdk pr to be merged before usage. In addition only viam-servers on this version or later can use the module due to the tagger/proto reflection issue we ran into.
test robot
example code(get the API key from the robot)