Documentation ¶
Index ¶
- func BoardListWatchProxyToChan(ctx context.Context) (rpc.ArduinoCoreService_BoardListWatchServer, ...)
- func BurnBootloaderToServerStreams(ctx context.Context, outStrem, errStream io.Writer) rpc.ArduinoCoreService_BurnBootloaderServer
- func CompilerServerToStreams(ctx context.Context, stdOut, stderr io.Writer, progressCB rpc.TaskProgressCB) (server rpc.ArduinoCoreService_CompileServer, ...)
- func DebugServerToStreams(ctx context.Context, req *rpc.GetDebugConfigRequest, in io.Reader, ...) rpc.ArduinoCoreService_DebugServer
- func GitLibraryInstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_GitLibraryInstallServer
- func InitStreamResponseToCallbackFunction(ctx context.Context, cb func(r *rpc.InitResponse) error) rpc.ArduinoCoreService_InitServer
- func LibraryDownloadStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) rpc.ArduinoCoreService_LibraryDownloadServer
- func LibraryInstallStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, ...) rpc.ArduinoCoreService_LibraryInstallServer
- func LibraryUninstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_LibraryUninstallServer
- func LibraryUpgradeAllStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, ...) rpc.ArduinoCoreService_LibraryUpgradeAllServer
- func LibraryUpgradeStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, ...) rpc.ArduinoCoreService_LibraryUpgradeServer
- func MatcherFromQueryString(query string) func(*librariesindex.Library) bool
- func MonitorServerToReadWriteCloser(ctx context.Context, req *rpc.MonitorPortOpenRequest) (rpc.ArduinoCoreService_MonitorServer, io.ReadWriteCloser)
- func NewArduinoCoreServer() rpc.ArduinoCoreServiceServer
- func PlatformDownloadStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) rpc.ArduinoCoreService_PlatformDownloadServer
- func PlatformInstallStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, ...) rpc.ArduinoCoreService_PlatformInstallServer
- func PlatformUninstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_PlatformUninstallServer
- func PlatformUpgradeStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, ...) (rpc.ArduinoCoreService_PlatformUpgradeServer, ...)
- func UpdateIndexStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) (rpc.ArduinoCoreService_UpdateIndexServer, ...)
- func UpdateLibrariesIndexStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) (rpc.ArduinoCoreService_UpdateLibrariesIndexServer, ...)
- func UploadToServerStreams(ctx context.Context, outStream io.Writer, errStream io.Writer) (rpc.ArduinoCoreService_UploadServer, func() *rpc.UploadResult)
- func ZipLibraryInstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_ZipLibraryInstallServer
- type SynchronizedSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoardListWatchProxyToChan ¶ added in v1.0.0
func BoardListWatchProxyToChan(ctx context.Context) (rpc.ArduinoCoreService_BoardListWatchServer, <-chan *rpc.BoardListWatchResponse)
BoardListWatchProxyToChan return a stream, to be used in BoardListWatch method, that proxies all the responses to a channel.
func BurnBootloaderToServerStreams ¶ added in v1.0.0
func BurnBootloaderToServerStreams(ctx context.Context, outStrem, errStream io.Writer) rpc.ArduinoCoreService_BurnBootloaderServer
BurnBootloaderToServerStreams return a server stream that forwards the output and error streams to the provided io.Writers
func CompilerServerToStreams ¶ added in v1.0.0
func CompilerServerToStreams(ctx context.Context, stdOut, stderr io.Writer, progressCB rpc.TaskProgressCB) (server rpc.ArduinoCoreService_CompileServer, resultCB func() *rpc.BuilderResult)
CompilerServerToStreams creates a gRPC CompileServer that sends the responses to the provided streams. The returned callback function can be used to retrieve the builder result after the compilation is done.
func DebugServerToStreams ¶ added in v1.0.4
func DebugServerToStreams( ctx context.Context, req *rpc.GetDebugConfigRequest, in io.Reader, out io.Writer, sig chan os.Signal, resultCB func(*rpc.DebugResponse_Result), ) rpc.ArduinoCoreService_DebugServer
DebugServerToStreams creates a debug server that proxies the data to the given io streams. The GetDebugConfigRequest is used to configure the debbuger. sig is a channel that can be used to send os.Interrupt to the debug process. resultCB is a callback function that will receive the Debug result and closes the debug server.
func GitLibraryInstallStreamResponseToCallbackFunction ¶ added in v1.0.0
func GitLibraryInstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_GitLibraryInstallServer
GitLibraryInstallStreamResponseToCallbackFunction returns a gRPC stream to be used in GitLibraryInstall that sends all responses to the callback function.
func InitStreamResponseToCallbackFunction ¶ added in v1.0.0
func InitStreamResponseToCallbackFunction(ctx context.Context, cb func(r *rpc.InitResponse) error) rpc.ArduinoCoreService_InitServer
InitStreamResponseToCallbackFunction returns a gRPC stream to be used in Init that sends all responses to the callback function.
func LibraryDownloadStreamResponseToCallbackFunction ¶ added in v1.0.0
func LibraryDownloadStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) rpc.ArduinoCoreService_LibraryDownloadServer
LibraryDownloadStreamResponseToCallbackFunction returns a gRPC stream to be used in LibraryDownload that sends all responses to the callback function.
func LibraryInstallStreamResponseToCallbackFunction ¶ added in v1.0.0
func LibraryInstallStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_LibraryInstallServer
LibraryInstallStreamResponseToCallbackFunction returns a gRPC stream to be used in LibraryInstall that sends all responses to the callback function.
func LibraryUninstallStreamResponseToCallbackFunction ¶ added in v1.0.0
func LibraryUninstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_LibraryUninstallServer
LibraryUninstallStreamResponseToCallbackFunction returns a gRPC stream to be used in LibraryUninstall that sends all responses to the callback function.
func LibraryUpgradeAllStreamResponseToCallbackFunction ¶ added in v1.0.0
func LibraryUpgradeAllStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_LibraryUpgradeAllServer
LibraryUpgradeAllStreamResponseToCallbackFunction returns a gRPC stream to be used in LibraryUpgradeAll that sends all responses to the callback function.
func LibraryUpgradeStreamResponseToCallbackFunction ¶ added in v1.0.0
func LibraryUpgradeStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_LibraryUpgradeServer
LibraryUpgradeStreamResponseToCallbackFunction returns a gRPC stream to be used in LibraryUpgrade that sends all responses to the callback function.
func MatcherFromQueryString ¶ added in v1.0.0
func MatcherFromQueryString(query string) func(*librariesindex.Library) bool
MatcherFromQueryString returns a closure that takes a library as a parameter and returns true if the library matches the query.
func MonitorServerToReadWriteCloser ¶ added in v1.0.0
func MonitorServerToReadWriteCloser(ctx context.Context, req *rpc.MonitorPortOpenRequest) (rpc.ArduinoCoreService_MonitorServer, io.ReadWriteCloser)
MonitorServerToReadWriteCloser creates a monitor server that proxies the data to a ReadWriteCloser. The server is returned along with the ReadWriteCloser that can be used to send and receive data to the server. The MonitorPortOpenRequest is used to configure the monitor.
func NewArduinoCoreServer ¶ added in v1.0.0
func NewArduinoCoreServer() rpc.ArduinoCoreServiceServer
NewArduinoCoreServer returns an implementation of the ArduinoCoreService gRPC service that uses the provided version string.
func PlatformDownloadStreamResponseToCallbackFunction ¶ added in v1.0.0
func PlatformDownloadStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) rpc.ArduinoCoreService_PlatformDownloadServer
PlatformDownloadStreamResponseToCallbackFunction returns a gRPC stream to be used in PlatformDownload that sends all responses to the callback function.
func PlatformInstallStreamResponseToCallbackFunction ¶ added in v1.0.0
func PlatformInstallStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_PlatformInstallServer
UpdateIndexStreamResponseToCallbackFunction returns a gRPC stream to be used in PlatformInstall that sends all responses to the callback function.
func PlatformUninstallStreamResponseToCallbackFunction ¶ added in v1.0.0
func PlatformUninstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_PlatformUninstallServer
PlatformUninstallStreamResponseToCallbackFunction returns a gRPC stream to be used in PlatformUninstall that sends all responses to the callback function.
func PlatformUpgradeStreamResponseToCallbackFunction ¶ added in v1.0.0
func PlatformUpgradeStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB, taskCB rpc.TaskProgressCB) (rpc.ArduinoCoreService_PlatformUpgradeServer, func() *rpc.PlatformUpgradeResponse_Result)
PlatformUpgradeStreamResponseToCallbackFunction returns a gRPC stream to be used in PlatformUpgrade that sends all responses to the callback function.
func UpdateIndexStreamResponseToCallbackFunction ¶ added in v1.0.0
func UpdateIndexStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) (rpc.ArduinoCoreService_UpdateIndexServer, func() *rpc.UpdateIndexResponse_Result)
UpdateIndexStreamResponseToCallbackFunction returns a gRPC stream to be used in UpdateIndex that sends all responses to the callback function.
func UpdateLibrariesIndexStreamResponseToCallbackFunction ¶ added in v1.0.0
func UpdateLibrariesIndexStreamResponseToCallbackFunction(ctx context.Context, downloadCB rpc.DownloadProgressCB) (rpc.ArduinoCoreService_UpdateLibrariesIndexServer, func() *rpc.UpdateLibrariesIndexResponse_Result)
UpdateLibrariesIndexStreamResponseToCallbackFunction returns a gRPC stream to be used in UpdateLibrariesIndex that sends all responses to the callback function.
func UploadToServerStreams ¶ added in v1.0.0
func UploadToServerStreams(ctx context.Context, outStream io.Writer, errStream io.Writer) (rpc.ArduinoCoreService_UploadServer, func() *rpc.UploadResult)
UploadToServerStreams return a server stream that forwards the output and error streams to the provided writers. It also returns a function that can be used to retrieve the result of the upload.
func ZipLibraryInstallStreamResponseToCallbackFunction ¶ added in v1.0.0
func ZipLibraryInstallStreamResponseToCallbackFunction(ctx context.Context, taskCB rpc.TaskProgressCB) rpc.ArduinoCoreService_ZipLibraryInstallServer
ZipLibraryInstallStreamResponseToCallbackFunction returns a gRPC stream to be used in ZipLibraryInstall that sends all responses to the callback function.
Types ¶
type SynchronizedSender ¶ added in v1.0.0
type SynchronizedSender[T any] struct { // contains filtered or unexported fields }
SynchronizedSender is a sender function with an extra protection for concurrent writes, if multiple threads call the Send method they will be blocked and serialized.
func NewSynchronizedSend ¶ added in v1.0.0
func NewSynchronizedSend[T any](send func(T) error) *SynchronizedSender[T]
NewSynchronizedSend takes a Send function and wraps it in a SynchronizedSender
func (*SynchronizedSender[T]) Send ¶ added in v1.0.0
func (s *SynchronizedSender[T]) Send(value T) error
Send the message using the underlyng stream.
Source Files ¶
- instances.go
- service.go
- service_board_details.go
- service_board_list.go
- service_board_listall.go
- service_board_search.go
- service_cache_clean.go
- service_check_for_updates.go
- service_compile.go
- service_debug.go
- service_debug_config.go
- service_library_download.go
- service_library_install.go
- service_library_list.go
- service_library_resolve_deps.go
- service_library_search.go
- service_library_uninstall.go
- service_library_upgrade.go
- service_monitor.go
- service_monitor_settings.go
- service_platform_download.go
- service_platform_install.go
- service_platform_search.go
- service_platform_uninstall.go
- service_platform_upgrade.go
- service_set_sketch_defaults.go
- service_settings.go
- service_sketch_archive.go
- service_sketch_load.go
- service_sketch_new.go
- service_stream_utility.go
- service_upload.go
- service_upload_burnbootloader.go
- service_upload_list_programmers.go
- utility_core.go
- utility_grpc_streaming.go
- utility_libraries_index_search_matcher.go
- utility_version.go