Documentation ¶
Overview ¶
spiderman client
Index ¶
- type Spiderman
- type SpidermanClient
- func (receiver *SpidermanClient) Alert(conf dto.AlertConf) (alert.AlertInterface, error)
- func (receiver *SpidermanClient) Pizza(conf dto.PizzaConf) (pizza.PizzaInterface, error)
- func (receiver *SpidermanClient) Schedule(conf dto.ScheduleConf) (schedule.ScheduleInterface, error)
- func (receiver *SpidermanClient) Sso(conf dto.SsoConf) (sso.SsoInterface, error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spiderman ¶
type Spiderman interface { Alert(conf dto.AlertConf) (alert.AlertInterface, error) //Alert 消息服务 Pizza(conf dto.PizzaConf) (pizza.PizzaInterface, error) //Pizza pizza服务 Schedule(conf dto.ScheduleConf) (schedule.ScheduleInterface, error) //Schedule 定时任务调度服务 Sso(conf dto.SsoConf) (sso.SsoInterface, error) //Sso sso服务 }
Spiderman support pipelining using the Pizza, Sso, Schedule and Alert methods
type SpidermanClient ¶
func (*SpidermanClient) Alert ¶
func (receiver *SpidermanClient) Alert(conf dto.AlertConf) (alert.AlertInterface, error)
Alert store alert service
Example ¶
conf := dto.AppConf{ ServiceName: "test", Token: "example", } spiderman, _ := NewSpiderman(conf) alertConf := dto.AlertConf{ BaseUri: "127.0.0.1", Level: "warn", Env: "test", } alert, _ := spiderman.Alert(alertConf) fmt.Println(alert)
Output:
func (*SpidermanClient) Pizza ¶
func (receiver *SpidermanClient) Pizza(conf dto.PizzaConf) (pizza.PizzaInterface, error)
Pizza store pizza service
Example ¶
conf := dto.AppConf{ ServiceName: "test", Token: "example", } spiderman, _ := NewSpiderman(conf) pizzaConf := dto.PizzaConf{ BaseUri: "127.0.0.1", } pizza, _ := spiderman.Pizza(pizzaConf) fmt.Println(pizza)
Output:
func (*SpidermanClient) Schedule ¶
func (receiver *SpidermanClient) Schedule(conf dto.ScheduleConf) (schedule.ScheduleInterface, error)
Schedule store schedule service
Example ¶
conf := dto.AppConf{ ServiceName: "test", Token: "example", } spiderman, _ := NewSpiderman(conf) schedule, _ := spiderman.Schedule(dto.ScheduleConf{ BaseUri: "http://127.0.0.1:8081", CallbackUri: "http://127.0.0.1:8080", }) fmt.Println(schedule)
Output:
func (*SpidermanClient) Sso ¶
func (receiver *SpidermanClient) Sso(conf dto.SsoConf) (sso.SsoInterface, error)
Sso store sso service
Example ¶
conf := dto.AppConf{ ServiceName: "test", Token: "example", } spiderman, _ := NewSpiderman(conf) ssoConf := dto.SsoConf{ BaseUri: "127.0.0.1", AppId: "test", AppKey: "test1", } sso, _ := spiderman.Sso(ssoConf) fmt.Println(sso)
Output:
Click to show internal directories.
Click to hide internal directories.