Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

about wiki "Create a simple service" #208

Open
zweite opened this issue Jul 25, 2014 · 2 comments
Open

about wiki "Create a simple service" #208

zweite opened this issue Jul 25, 2014 · 2 comments

Comments

@zweite
Copy link

zweite commented Jul 25, 2014

skynet service hadn't GetServiceConfig function, it change to NewServiceInfo.

func main() {
    tutorial := &TutorialService{}
    config := skynet.NewServiceInfo("TutorialService", "1")
    config.Region = "Development"
    service := service.CreateService(tutorial, config)
    defer func() {
        service.Shutdown()
    }()
    waiter := service.Start()
    waiter.Wait()
}

However, I found the exception ,
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4f0a9e]

@miekg
Copy link

miekg commented Jul 25, 2014

This is with skydns version 1 probably? Note that main development is now
focussed on skydns2 where things are done different.
On 25 Jul 2014 03:26, "zweite" notifications@github.com wrote:

skynet service hadn't GetServiceConfig function, it change to
NewServiceInfo.
func main() {
tutorial := &TutorialService{}
config := skynet.NewServiceInfo("TutorialService", "1")
config.Region = "Development"

service := service.CreateService(tutorial, config)

defer func() {
service.Shutdown()
}()

waiter := service.Start()
waiter.Wait()

}

However, I found the exception ,
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4f0a9e]


Reply to this email directly or view it on GitHub
#208.

@zweite
Copy link
Author

zweite commented Jul 25, 2014

thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants