buildclient

package
v0.8.0-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingBuilder

func PingBuilder(ctx context.Context, baseURL string) bool

func Stream

func Stream(ctx context.Context, cwd string, streams *streams.Output, dialer WebSocketDialer,
	creds CredentialLookup, build *apiv1.AcornImageBuild) (*v1.AppImage, error)

Types

type CredentialLookup

type CredentialLookup func(ctx context.Context, serverAddress string) (*apiv1.RegistryAuth, bool, error)

type FileServer

type FileServer struct {
	// contains filtered or unexported fields
}

func NewFileServer

func NewFileServer(messages Messages, context string, additionalContexts map[string]string, dockerfilePath, dockerFileContents string) *FileServer

func (*FileServer) DiffCopy

func (f *FileServer) DiffCopy(server filesync.FileSync_DiffCopyServer) error

func (*FileServer) Register

func (f *FileServer) Register(server *grpc.Server)

func (*FileServer) TarStream

func (f *FileServer) TarStream(server filesync.FileSync_TarStreamServer) error

type Message

type Message struct {
	FileSessionID         string       `json:"fileSessionID,omitempty"`
	StatusSessionID       string       `json:"statusSessionID,omitempty"`
	AppImage              *v1.AppImage `json:"appImage,omitempty"`
	Error                 string       `json:"error,omitempty"`
	Acornfile             string       `json:"acornfile,omitempty"`
	ReadFile              string       `json:"readFile,omitempty"`
	RegistryServerAddress string       `json:"registryServerAddress,omitempty"`

	FileSessionClose bool                `json:"fileSessionClose,omitempty"`
	RegistryAuth     *apiv1.RegistryAuth `json:"registryAuth,omitempty"`
	SyncOptions      *SyncOptions        `json:"syncOptions,omitempty"`
	Packet           *types.Packet       `json:"packet,omitempty"`
	PacketData       []byte              `json:"packetData,omitempty"`
	Status           *client.SolveStatus `json:"status,omitempty"`
	Compress         bool                `json:"compress,omitempty"`
}

func (*Message) MarshalJSON

func (m *Message) MarshalJSON() ([]byte, error)

func (*Message) String

func (m *Message) String() string

func (*Message) UnmarshalJSON

func (m *Message) UnmarshalJSON(data []byte) error

type Messages

type Messages interface {
	Recv() (msgs <-chan *Message, cancel func())
	Send(msg *Message) error
	Close()
}

type SyncOptions

type SyncOptions struct {
	Context            string
	AdditionalContexts map[string]string
	Dockerfile         string
	DockerfileContents string

	OverrideExcludes   []string
	IncludePatterns    []string
	ExcludePatterns    []string
	FollowPaths        []string
	DirName            []string
	ExporterMetaPrefix []string
	Compress           bool
}

type WebSocketDialer

type WebSocketDialer func(ctx context.Context, urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error)

type WebsocketMessages

type WebsocketMessages struct {
	// contains filtered or unexported fields
}

func NewWebsocketMessages

func NewWebsocketMessages(conn *websocket.Conn) *WebsocketMessages

func (*WebsocketMessages) Close

func (m *WebsocketMessages) Close()

func (*WebsocketMessages) OnMessage

func (m *WebsocketMessages) OnMessage(handler func(message *Message) error)

OnMessage is a synchronous handler that will block the input of messages until the handler finishes.

func (*WebsocketMessages) Recv

func (m *WebsocketMessages) Recv() (<-chan *Message, func())

func (*WebsocketMessages) Send

func (m *WebsocketMessages) Send(msg *Message) error

func (*WebsocketMessages) Start

func (m *WebsocketMessages) Start(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL