Documentation ¶
Overview ¶
Package server provides the stateless container for Lavalink.
Index ¶
- type PlayerAction
- type Server
- func (s *Server) GetNode(ctx *fasthttp.RequestCtx)
- func (s *Server) GetPlayer(ctx *fasthttp.RequestCtx)
- func (s *Server) GetSong(ctx *fasthttp.RequestCtx)
- func (s *Server) GetSongs(ctx *fasthttp.RequestCtx)
- func (s *Server) PatchSongs(ctx *fasthttp.RequestCtx)
- func (s *Server) PutPlayer(ctx *fasthttp.RequestCtx)
- func (s *Server) PutSongs(ctx *fasthttp.RequestCtx)
- func (s *Server) Serve(addr string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlayerAction ¶
type PlayerAction struct { Action string `json:"action"` Track string `json:"track,omitempty"` Paused bool `json:"paused,omitempty"` }
PlayerAction represents an action to be taken when modifying the playing state of a player
type Server ¶
type Server struct { Conn *lavalink.Connection HTTP *lavalink.HTTP Cache store.Lavalink Queue queue.Queue }
Server represents a server to front a single Lavalink node. Multiple servers must be launched to handle multiple nodes.
func (*Server) GetNode ¶
func (s *Server) GetNode(ctx *fasthttp.RequestCtx)
GetNode gets the given node
func (*Server) GetPlayer ¶
func (s *Server) GetPlayer(ctx *fasthttp.RequestCtx)
GetPlayer gets the player for the given guild
func (*Server) GetSong ¶
func (s *Server) GetSong(ctx *fasthttp.RequestCtx)
GetSong gets the given song from the given queue
func (*Server) GetSongs ¶
func (s *Server) GetSongs(ctx *fasthttp.RequestCtx)
GetSongs gets songs for the given guild
func (*Server) PatchSongs ¶
func (s *Server) PatchSongs(ctx *fasthttp.RequestCtx)
PatchSongs adds songs to the given queue
func (*Server) PutPlayer ¶
func (s *Server) PutPlayer(ctx *fasthttp.RequestCtx)
PutPlayer modifies the playing state of the player
func (*Server) PutSongs ¶
func (s *Server) PutSongs(ctx *fasthttp.RequestCtx)
PutSongs sets the songs for a given queue
Click to show internal directories.
Click to hide internal directories.